Skip to content

Commit 2020a37

Browse files
committed
Remove use of ForwardCompatTrait
1 parent 4fd39fe commit 2020a37

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

Tests/CsrfTokenManagerTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Csrf\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Request;
1716
use Symfony\Component\HttpFoundation\RequestStack;
1817
use Symfony\Component\Security\Csrf\CsrfToken;
@@ -23,8 +22,6 @@
2322
*/
2423
class CsrfTokenManagerTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
/**
2926
* @dataProvider getManagerGeneratorAndStorage
3027
*/
@@ -213,12 +210,12 @@ private function getGeneratorAndStorage()
213210
];
214211
}
215212

216-
private function doSetUp()
213+
protected function setUp()
217214
{
218215
$_SERVER['HTTPS'] = 'on';
219216
}
220217

221-
private function doTearDown()
218+
protected function tearDown()
222219
{
223220
parent::tearDown();
224221

Tests/TokenGenerator/UriSafeTokenGeneratorTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Component\Security\Csrf\Tests\TokenGenerator;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator;
1716

1817
/**
1918
* @author Bernhard Schussek <[email protected]>
2019
*/
2120
class UriSafeTokenGeneratorTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
const ENTROPY = 1000;
2623

2724
/**
@@ -36,17 +33,17 @@ class UriSafeTokenGeneratorTest extends TestCase
3633
*/
3734
private $generator;
3835

39-
private static function doSetUpBeforeClass()
36+
public static function setUpBeforeClass()
4037
{
4138
self::$bytes = base64_decode('aMf+Tct/RLn2WQ==');
4239
}
4340

44-
private function doSetUp()
41+
protected function setUp()
4542
{
4643
$this->generator = new UriSafeTokenGenerator(self::ENTROPY);
4744
}
4845

49-
private function doTearDown()
46+
protected function tearDown()
5047
{
5148
$this->generator = null;
5249
}

Tests/TokenStorage/NativeSessionTokenStorageTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Csrf\Tests\TokenStorage;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage;
1716

1817
/**
@@ -23,16 +22,14 @@
2322
*/
2423
class NativeSessionTokenStorageTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
const SESSION_NAMESPACE = 'foobar';
2926

3027
/**
3128
* @var NativeSessionTokenStorage
3229
*/
3330
private $storage;
3431

35-
private function doSetUp()
32+
protected function setUp()
3633
{
3734
$_SESSION = [];
3835

Tests/TokenStorage/SessionTokenStorageTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Csrf\Tests\TokenStorage;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\HttpFoundation\Session\Session;
1716
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
1817
use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage;
@@ -22,8 +21,6 @@
2221
*/
2322
class SessionTokenStorageTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
const SESSION_NAMESPACE = 'foobar';
2825

2926
/**
@@ -36,7 +33,7 @@ class SessionTokenStorageTest extends TestCase
3633
*/
3734
private $storage;
3835

39-
private function doSetUp()
36+
protected function setUp()
4037
{
4138
$this->session = new Session(new MockArraySessionStorage());
4239
$this->storage = new SessionTokenStorage($this->session, self::SESSION_NAMESPACE);

0 commit comments

Comments
 (0)