Skip to content

Commit 20fc03a

Browse files
committed
Remove use of ForwardCompatTrait
1 parent bf44ce8 commit 20fc03a

File tree

7 files changed

+4
-25
lines changed

7 files changed

+4
-25
lines changed

Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817
use Symfony\Component\DependencyInjection\Exception\LogicException;
@@ -22,8 +21,6 @@
2221

2322
class AddSecurityVotersPassTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testNoVoters()
2825
{
2926
$this->expectException('Symfony\Component\DependencyInjection\Exception\LogicException');

Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
1716
use Symfony\Bundle\SecurityBundle\SecurityBundle;
1817
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@@ -23,8 +22,6 @@
2322

2423
abstract class CompleteConfigurationTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
abstract protected function getLoader(ContainerBuilder $container);
2926

3027
abstract protected function getFileExtension();

Tests/DependencyInjection/MainConfigurationTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration;
1716
use Symfony\Component\Config\Definition\Processor;
1817

1918
class MainConfigurationTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
/**
2421
* The minimal, required config needed to not have any required validation
2522
* issues.

Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory;
1716
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1817
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@@ -21,8 +20,6 @@
2120

2221
class GuardAuthenticationFactoryTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
/**
2724
* @dataProvider getValidConfigurationTests
2825
*/

Tests/DependencyInjection/SecurityExtensionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
1716
use Symfony\Bundle\SecurityBundle\SecurityBundle;
1817
use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\DummyProvider;
1918
use Symfony\Component\DependencyInjection\ContainerBuilder;
2019

2120
class SecurityExtensionTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testInvalidCheckPath()
2623
{
2724
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');

Tests/Functional/AbstractWebTestCase.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,23 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
1615
use Symfony\Component\Filesystem\Filesystem;
1716

1817
class AbstractWebTestCase extends BaseWebTestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
public static function assertRedirect($response, $location)
2320
{
2421
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000));
2522
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
2623
}
2724

28-
private static function doSetUpBeforeClass()
25+
public static function setUpBeforeClass()
2926
{
3027
static::deleteTmpDir();
3128
}
3229

33-
private static function doTearDownAfterClass()
30+
public static function tearDownAfterClass()
3431
{
3532
static::deleteTmpDir();
3633
}

Tests/Functional/UserPasswordEncoderCommandTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Console\Application;
1615
use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand;
1716
use Symfony\Component\Console\Application as ConsoleApplication;
@@ -28,8 +27,6 @@
2827
*/
2928
class UserPasswordEncoderCommandTest extends AbstractWebTestCase
3029
{
31-
use ForwardCompatTestTrait;
32-
3330
/** @var CommandTester */
3431
private $passwordEncoderCommandTester;
3532

@@ -246,7 +243,7 @@ public function testLegacy()
246243
$this->assertContains('Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', $tester->getDisplay());
247244
}
248245

249-
private function doSetUp()
246+
protected function setUp()
250247
{
251248
putenv('COLUMNS='.(119 + \strlen(PHP_EOL)));
252249
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
@@ -259,7 +256,7 @@ private function doSetUp()
259256
$this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand);
260257
}
261258

262-
private function doTearDown()
259+
protected function tearDown()
263260
{
264261
$this->passwordEncoderCommandTester = null;
265262
}

0 commit comments

Comments
 (0)