File tree Expand file tree Collapse file tree 4 files changed +7
-19
lines changed Expand file tree Collapse file tree 4 files changed +7
-19
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Csrf \Tests ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
16
15
use Symfony \Component \HttpFoundation \Request ;
17
16
use Symfony \Component \HttpFoundation \RequestStack ;
18
17
use Symfony \Component \Security \Csrf \CsrfToken ;
23
22
*/
24
23
class CsrfTokenManagerTest extends TestCase
25
24
{
26
- use ForwardCompatTestTrait;
27
-
28
25
/**
29
26
* @dataProvider getManagerGeneratorAndStorage
30
27
*/
@@ -213,12 +210,12 @@ private function getGeneratorAndStorage()
213
210
];
214
211
}
215
212
216
- private function doSetUp ()
213
+ protected function setUp ()
217
214
{
218
215
$ _SERVER ['HTTPS ' ] = 'on ' ;
219
216
}
220
217
221
- private function doTearDown ()
218
+ protected function tearDown ()
222
219
{
223
220
parent ::tearDown ();
224
221
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Csrf \Tests \TokenGenerator ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
16
15
use Symfony \Component \Security \Csrf \TokenGenerator \UriSafeTokenGenerator ;
17
16
18
17
/**
19
18
* @author Bernhard Schussek <[email protected] >
20
19
*/
21
20
class UriSafeTokenGeneratorTest extends TestCase
22
21
{
23
- use ForwardCompatTestTrait;
24
-
25
22
const ENTROPY = 1000 ;
26
23
27
24
/**
@@ -36,17 +33,17 @@ class UriSafeTokenGeneratorTest extends TestCase
36
33
*/
37
34
private $ generator ;
38
35
39
- private static function doSetUpBeforeClass ()
36
+ public static function setUpBeforeClass ()
40
37
{
41
38
self ::$ bytes = base64_decode ('aMf+Tct/RLn2WQ== ' );
42
39
}
43
40
44
- private function doSetUp ()
41
+ protected function setUp ()
45
42
{
46
43
$ this ->generator = new UriSafeTokenGenerator (self ::ENTROPY );
47
44
}
48
45
49
- private function doTearDown ()
46
+ protected function tearDown ()
50
47
{
51
48
$ this ->generator = null ;
52
49
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Csrf \Tests \TokenStorage ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
16
15
use Symfony \Component \Security \Csrf \TokenStorage \NativeSessionTokenStorage ;
17
16
18
17
/**
23
22
*/
24
23
class NativeSessionTokenStorageTest extends TestCase
25
24
{
26
- use ForwardCompatTestTrait;
27
-
28
25
const SESSION_NAMESPACE = 'foobar ' ;
29
26
30
27
/**
31
28
* @var NativeSessionTokenStorage
32
29
*/
33
30
private $ storage ;
34
31
35
- private function doSetUp ()
32
+ protected function setUp ()
36
33
{
37
34
$ _SESSION = [];
38
35
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Security \Csrf \Tests \TokenStorage ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
16
15
use Symfony \Component \HttpFoundation \Session \Session ;
17
16
use Symfony \Component \HttpFoundation \Session \Storage \MockArraySessionStorage ;
18
17
use Symfony \Component \Security \Csrf \TokenStorage \SessionTokenStorage ;
22
21
*/
23
22
class SessionTokenStorageTest extends TestCase
24
23
{
25
- use ForwardCompatTestTrait;
26
-
27
24
const SESSION_NAMESPACE = 'foobar ' ;
28
25
29
26
/**
@@ -36,7 +33,7 @@ class SessionTokenStorageTest extends TestCase
36
33
*/
37
34
private $ storage ;
38
35
39
- private function doSetUp ()
36
+ protected function setUp ()
40
37
{
41
38
$ this ->session = new Session (new MockArraySessionStorage ());
42
39
$ this ->storage = new SessionTokenStorage ($ this ->session , self ::SESSION_NAMESPACE );
You can’t perform that action at this time.
0 commit comments