File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Security \Core \Tests \Authorization ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
1516use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorage ;
1617use Symfony \Component \Security \Core \Authorization \AuthorizationChecker ;
1718
1819class AuthorizationCheckerTest extends TestCase
1920{
21+ use ForwardCompatTestTrait;
22+
2023 private $ authenticationManager ;
2124 private $ accessDecisionManager ;
2225 private $ authorizationChecker ;
2326 private $ tokenStorage ;
2427
25- protected function setUp ()
28+ private function doSetUp ()
2629 {
2730 $ this ->authenticationManager = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
2831 $ this ->accessDecisionManager = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface ' )->getMock ();
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Security \Core \Tests \Authorization \Voter ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
1516use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
1617use Symfony \Component \Security \Core \Authorization \Voter \Voter ;
1718use Symfony \Component \Security \Core \Authorization \Voter \VoterInterface ;
1819
1920class VoterTest extends TestCase
2021{
22+ use ForwardCompatTestTrait;
23+
2124 protected $ token ;
2225
23- protected function setUp ()
26+ private function doSetUp ()
2427 {
2528 $ this ->token = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )->getMock ();
2629 }
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Security \Core \Tests \Encoder ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
1516use Symfony \Component \Security \Core \Encoder \Argon2iPasswordEncoder ;
1617
1718/**
1819 * @author Zan Baldwin <hello@zanbaldwin.com>
1920 */
2021class Argon2iPasswordEncoderTest extends TestCase
2122{
23+ use ForwardCompatTestTrait;
24+
2225 const PASSWORD = 'password ' ;
2326
24- protected function setUp ()
27+ private function doSetUp ()
2528 {
2629 if (!Argon2iPasswordEncoder::isSupported ()) {
2730 $ this ->markTestSkipped ('Argon2i algorithm is not supported. ' );
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Security \Core \Tests \Validator \Constraints ;
1313
14+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
1415use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface ;
1516use Symfony \Component \Security \Core \Encoder \EncoderFactoryInterface ;
1617use Symfony \Component \Security \Core \Encoder \PasswordEncoderInterface ;
2324 */
2425abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase
2526{
27+ use ForwardCompatTestTrait;
28+
2629 const PASSWORD = 's3Cr3t ' ;
2730 const SALT = '^S4lt$ ' ;
2831
@@ -46,7 +49,7 @@ protected function createValidator()
4649 return new UserPasswordValidator ($ this ->tokenStorage , $ this ->encoderFactory );
4750 }
4851
49- protected function setUp ()
52+ private function doSetUp ()
5053 {
5154 $ user = $ this ->createUser ();
5255 $ this ->tokenStorage = $ this ->createTokenStorage ($ user );
You can’t perform that action at this time.
0 commit comments