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 12
12
namespace Symfony \Component \Security \Core \Tests \Authorization ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorage ;
16
17
use Symfony \Component \Security \Core \Authorization \AuthorizationChecker ;
17
18
18
19
class AuthorizationCheckerTest extends TestCase
19
20
{
21
+ use ForwardCompatTestTrait;
22
+
20
23
private $ authenticationManager ;
21
24
private $ accessDecisionManager ;
22
25
private $ authorizationChecker ;
23
26
private $ tokenStorage ;
24
27
25
- protected function setUp ()
28
+ private function doSetUp ()
26
29
{
27
30
$ this ->authenticationManager = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' )->getMock ();
28
31
$ this ->accessDecisionManager = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface ' )->getMock ();
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Core \Tests \Authorization \Voter ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
16
17
use Symfony \Component \Security \Core \Authorization \Voter \Voter ;
17
18
use Symfony \Component \Security \Core \Authorization \Voter \VoterInterface ;
18
19
19
20
class VoterTest extends TestCase
20
21
{
22
+ use ForwardCompatTestTrait;
23
+
21
24
protected $ token ;
22
25
23
- protected function setUp ()
26
+ private function doSetUp ()
24
27
{
25
28
$ this ->token = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )->getMock ();
26
29
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Core \Tests \Encoder ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \Security \Core \Encoder \Argon2iPasswordEncoder ;
16
17
17
18
/**
18
19
* @author Zan Baldwin <[email protected] >
19
20
*/
20
21
class Argon2iPasswordEncoderTest extends TestCase
21
22
{
23
+ use ForwardCompatTestTrait;
24
+
22
25
const PASSWORD = 'password ' ;
23
26
24
- protected function setUp ()
27
+ private function doSetUp ()
25
28
{
26
29
if (!Argon2iPasswordEncoder::isSupported ()) {
27
30
$ this ->markTestSkipped ('Argon2i algorithm is not supported. ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Security \Core \Tests \Validator \Constraints ;
13
13
14
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
14
15
use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface ;
15
16
use Symfony \Component \Security \Core \Encoder \EncoderFactoryInterface ;
16
17
use Symfony \Component \Security \Core \Encoder \PasswordEncoderInterface ;
23
24
*/
24
25
abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase
25
26
{
27
+ use ForwardCompatTestTrait;
28
+
26
29
const PASSWORD = 's3Cr3t ' ;
27
30
const SALT = '^S4lt$ ' ;
28
31
@@ -46,7 +49,7 @@ protected function createValidator()
46
49
return new UserPasswordValidator ($ this ->tokenStorage , $ this ->encoderFactory );
47
50
}
48
51
49
- protected function setUp ()
52
+ private function doSetUp ()
50
53
{
51
54
$ user = $ this ->createUser ();
52
55
$ this ->tokenStorage = $ this ->createTokenStorage ($ user );
You can’t perform that action at this time.
0 commit comments