Remove use of ForwardCompatTrait

This commit is contained in:
Jérémy Derussé 2019-08-02 19:02:27 +02:00
parent 61894106d4
commit ac6242f36b
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2
675 changed files with 521 additions and 2514 deletions

View File

@ -17,6 +17,7 @@ env:
global: global:
- MIN_PHP=5.5.9 - MIN_PHP=5.5.9
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
matrix: matrix:
include: include:

View File

@ -13,17 +13,14 @@ namespace Symfony\Bridge\Doctrine\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\ContainerAwareEventManager; use Symfony\Bridge\Doctrine\ContainerAwareEventManager;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
class ContainerAwareEventManagerTest extends TestCase class ContainerAwareEventManagerTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $container; private $container;
private $evm; private $evm;
private function doSetUp() protected function setUp()
{ {
$this->container = new Container(); $this->container = new Container();
$this->evm = new ContainerAwareEventManager($this->container); $this->evm = new ContainerAwareEventManager($this->container);

View File

@ -13,15 +13,12 @@ namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
class RegisterEventListenersAndSubscribersPassTest extends TestCase class RegisterEventListenersAndSubscribersPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testExceptionOnAbstractTaggedSubscriber() public function testExceptionOnAbstractTaggedSubscriber()
{ {
$this->expectException('InvalidArgumentException'); $this->expectException('InvalidArgumentException');

View File

@ -4,14 +4,11 @@ namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
class RegisterMappingsPassTest extends TestCase class RegisterMappingsPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testNoDriverParmeterException() public function testNoDriverParmeterException()
{ {
$this->expectException('InvalidArgumentException'); $this->expectException('InvalidArgumentException');

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection; namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
@ -22,14 +21,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
*/ */
class DoctrineExtensionTest extends TestCase class DoctrineExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var \Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension * @var \Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension
*/ */
private $extension; private $extension;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -18,7 +18,6 @@ use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader; use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader;
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface; use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader; use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Form\ChoiceList\ArrayChoiceList; use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
@ -27,8 +26,6 @@ use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
*/ */
class DoctrineChoiceLoaderTest extends TestCase class DoctrineChoiceLoaderTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject * @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject
*/ */
@ -74,7 +71,7 @@ class DoctrineChoiceLoaderTest extends TestCase
*/ */
private $obj3; private $obj3;
private function doSetUp() protected function setUp()
{ {
$this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); $this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock();
$this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock(); $this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock();

View File

@ -14,21 +14,18 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\DataTransformer;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
/** /**
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
*/ */
class CollectionToArrayTransformerTest extends TestCase class CollectionToArrayTransformerTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var CollectionToArrayTransformer * @var CollectionToArrayTransformer
*/ */
private $transformer; private $transformer;
private function doSetUp() protected function setUp()
{ {
$this->transformer = new CollectionToArrayTransformer(); $this->transformer = new CollectionToArrayTransformer();
} }

View File

@ -14,7 +14,6 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\EventListener;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener; use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvent;
@ -22,8 +21,6 @@ use Symfony\Component\Form\FormEvents;
class MergeDoctrineCollectionListenerTest extends TestCase class MergeDoctrineCollectionListenerTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** @var \Doctrine\Common\Collections\ArrayCollection */ /** @var \Doctrine\Common\Collections\ArrayCollection */
private $collection; private $collection;
/** @var \Symfony\Component\EventDispatcher\EventDispatcher */ /** @var \Symfony\Component\EventDispatcher\EventDispatcher */
@ -31,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
private $factory; private $factory;
private $form; private $form;
private function doSetUp() protected function setUp()
{ {
$this->collection = new ArrayCollection(['test']); $this->collection = new ArrayCollection(['test']);
$this->dispatcher = new EventDispatcher(); $this->dispatcher = new EventDispatcher();
@ -40,7 +37,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
->getForm(); ->getForm();
} }
private function doTearDown() protected function tearDown()
{ {
$this->collection = null; $this->collection = null;
$this->dispatcher = null; $this->dispatcher = null;

View File

@ -15,7 +15,6 @@ use Doctrine\ORM\Tools\SchemaTool;
use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension; use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Form\Extension\Core\CoreExtension; use Symfony\Component\Form\Extension\Core\CoreExtension;
use Symfony\Component\Form\Test\FormPerformanceTestCase; use Symfony\Component\Form\Test\FormPerformanceTestCase;
@ -24,8 +23,6 @@ use Symfony\Component\Form\Test\FormPerformanceTestCase;
*/ */
class EntityTypePerformanceTest extends FormPerformanceTestCase class EntityTypePerformanceTest extends FormPerformanceTestCase
{ {
use ForwardCompatTestTrait;
const ENTITY_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'; const ENTITY_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity';
/** /**
@ -53,7 +50,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
]; ];
} }
private function doSetUp() protected function setUp()
{ {
$this->em = DoctrineTestHelper::createTestEntityManager(); $this->em = DoctrineTestHelper::createTestEntityManager();

View File

@ -28,7 +28,6 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringCastableIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringCastableIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\ChoiceList\View\ChoiceView;
use Symfony\Component\Form\Forms; use Symfony\Component\Form\Forms;
@ -37,8 +36,6 @@ use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest;
class EntityTypeTest extends BaseTypeTest class EntityTypeTest extends BaseTypeTest
{ {
use ForwardCompatTestTrait;
const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType'; const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType';
const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity'; const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity';
@ -62,7 +59,7 @@ class EntityTypeTest extends BaseTypeTest
protected static $supportedFeatureSetVersion = 304; protected static $supportedFeatureSetVersion = 304;
private function doSetUp() protected function setUp()
{ {
$this->em = DoctrineTestHelper::createTestEntityManager(); $this->em = DoctrineTestHelper::createTestEntityManager();
$this->emRegistry = $this->createRegistryMock('default', $this->em); $this->emRegistry = $this->createRegistryMock('default', $this->em);
@ -92,7 +89,7 @@ class EntityTypeTest extends BaseTypeTest
} }
} }
private function doTearDown() protected function tearDown()
{ {
parent::tearDown(); parent::tearDown();

View File

@ -13,14 +13,11 @@ namespace Symfony\Bridge\Doctrine\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\ManagerRegistry; use Symfony\Bridge\Doctrine\ManagerRegistry;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper\PhpDumperTest; use Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper\PhpDumperTest;
class ManagerRegistryTest extends TestCase class ManagerRegistryTest extends TestCase
{ {
use ForwardCompatTestTrait; public static function setUpBeforeClass()
private static function doSetUpBeforeClass()
{ {
if (!class_exists('PHPUnit_Framework_TestCase')) { if (!class_exists('PHPUnit_Framework_TestCase')) {
self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.'); self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.');

View File

@ -16,7 +16,6 @@ use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup; use Doctrine\ORM\Tools\Setup;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor; use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\PropertyInfo\Type; use Symfony\Component\PropertyInfo\Type;
/** /**
@ -24,14 +23,12 @@ use Symfony\Component\PropertyInfo\Type;
*/ */
class DoctrineExtractorTest extends TestCase class DoctrineExtractorTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var DoctrineExtractor * @var DoctrineExtractor
*/ */
private $extractor; private $extractor;
private function doSetUp() protected function setUp()
{ {
$config = Setup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true); $config = Setup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true);
$entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config); $entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config);

View File

@ -16,12 +16,9 @@ use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider; use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\User; use Symfony\Bridge\Doctrine\Tests\Fixtures\User;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
class EntityUserProviderTest extends TestCase class EntityUserProviderTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testRefreshUserGetsUserByPrimaryKey() public function testRefreshUserGetsUserByPrimaryKey()
{ {
$em = DoctrineTestHelper::createTestEntityManager(); $em = DoctrineTestHelper::createTestEntityManager();

View File

@ -32,7 +32,6 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdStringWrapperNameEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper; use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
/** /**
@ -40,8 +39,6 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
*/ */
class UniqueEntityValidatorTest extends ConstraintValidatorTestCase class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
{ {
use ForwardCompatTestTrait;
const EM_NAME = 'foo'; const EM_NAME = 'foo';
/** /**
@ -61,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
protected $repositoryFactory; protected $repositoryFactory;
private function doSetUp() protected function setUp()
{ {
$this->repositoryFactory = new TestRepositoryFactory(); $this->repositoryFactory = new TestRepositoryFactory();

View File

@ -13,7 +13,6 @@ namespace Symfony\Bridge\PhpUnit\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ClockMock; use Symfony\Bridge\PhpUnit\ClockMock;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
/** /**
* @author Dominic Tubach <dominic.tubach@to.com> * @author Dominic Tubach <dominic.tubach@to.com>
@ -22,14 +21,12 @@ use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
*/ */
class ClockMockTest extends TestCase class ClockMockTest extends TestCase
{ {
use ForwardCompatTestTrait; public static function setUpBeforeClass()
private static function doSetUpBeforeClass()
{ {
ClockMock::register(__CLASS__); ClockMock::register(__CLASS__);
} }
private function doSetUp() protected function setUp()
{ {
ClockMock::withClockMock(1234567890.125); ClockMock::withClockMock(1234567890.125);
} }

View File

@ -13,13 +13,10 @@ namespace Symfony\Bridge\PhpUnit\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\DnsMock; use Symfony\Bridge\PhpUnit\DnsMock;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
class DnsMockTest extends TestCase class DnsMockTest extends TestCase
{ {
use ForwardCompatTestTrait; protected function tearDown()
private function doTearDown()
{ {
DnsMock::withMockedHosts(array()); DnsMock::withMockedHosts(array());
} }

View File

@ -3,7 +3,6 @@
namespace Symfony\Bridge\PhpUnit\Tests; namespace Symfony\Bridge\PhpUnit\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
/** /**
* Don't remove this test case, it tests the legacy group. * Don't remove this test case, it tests the legacy group.
@ -14,8 +13,6 @@ use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
*/ */
class ProcessIsolationTest extends TestCase class ProcessIsolationTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @expectedDeprecation Test abc * @expectedDeprecation Test abc
*/ */

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Instantiator; namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Instantiator;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
@ -23,8 +22,6 @@ use Symfony\Component\DependencyInjection\Definition;
*/ */
class RuntimeInstantiatorTest extends TestCase class RuntimeInstantiatorTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var RuntimeInstantiator * @var RuntimeInstantiator
*/ */
@ -33,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
private function doSetUp() protected function setUp()
{ {
$this->instantiator = new RuntimeInstantiator(); $this->instantiator = new RuntimeInstantiator();
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper; namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
@ -25,8 +24,6 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
*/ */
class ProxyDumperTest extends TestCase class ProxyDumperTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var ProxyDumper * @var ProxyDumper
*/ */
@ -35,7 +32,7 @@ class ProxyDumperTest extends TestCase
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
private function doSetUp() protected function setUp()
{ {
$this->dumper = new ProxyDumper(); $this->dumper = new ProxyDumper();
} }

View File

@ -3,7 +3,6 @@
namespace Symfony\Bridge\Twig\Tests; namespace Symfony\Bridge\Twig\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\AppVariable; use Symfony\Bridge\Twig\AppVariable;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
@ -11,14 +10,12 @@ use Symfony\Component\HttpFoundation\Session\Session;
class AppVariableTest extends TestCase class AppVariableTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var AppVariable * @var AppVariable
*/ */
protected $appVariable; protected $appVariable;
private function doSetUp() protected function setUp()
{ {
$this->appVariable = new AppVariable(); $this->appVariable = new AppVariable();
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Command; namespace Symfony\Bridge\Twig\Tests\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Command\LintCommand; use Symfony\Bridge\Twig\Command\LintCommand;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
@ -22,8 +21,6 @@ use Twig\Loader\FilesystemLoader;
class LintCommandTest extends TestCase class LintCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $files; private $files;
public function testLintCorrectFile() public function testLintCorrectFile()
@ -114,12 +111,12 @@ class LintCommandTest extends TestCase
return $filename; return $filename;
} }
private function doSetUp() protected function setUp()
{ {
$this->files = []; $this->files = [];
} }
private function doTearDown() protected function tearDown()
{ {
foreach ($this->files as $file) { foreach ($this->files as $file) {
if (file_exists($file)) { if (file_exists($file)) {

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -23,8 +22,6 @@ use Twig\Environment;
class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3HorizontalLayoutTest class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3HorizontalLayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
protected $testableFeatures = [ protected $testableFeatures = [
@ -36,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori
*/ */
private $renderer; private $renderer;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -23,7 +22,6 @@ use Twig\Environment;
class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
/** /**
@ -31,7 +29,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
*/ */
private $renderer; private $renderer;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -28,7 +27,6 @@ use Twig\Environment;
*/ */
class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4HorizontalLayoutTest class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4HorizontalLayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
protected $testableFeatures = [ protected $testableFeatures = [
@ -37,7 +35,7 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori
private $renderer; private $renderer;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -28,14 +27,13 @@ use Twig\Environment;
*/ */
class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
/** /**
* @var FormRenderer * @var FormRenderer
*/ */
private $renderer; private $renderer;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -25,7 +24,6 @@ use Twig\Environment;
class FormExtensionDivLayoutTest extends AbstractDivLayoutTest class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
/** /**
@ -35,7 +33,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
protected static $supportedFeatureSetVersion = 304; protected static $supportedFeatureSetVersion = 304;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Form\TwigRendererEngine; use Symfony\Bridge\Twig\Form\TwigRendererEngine;
@ -24,7 +23,6 @@ use Twig\Environment;
class FormExtensionTableLayoutTest extends AbstractTableLayoutTest class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
{ {
use ForwardCompatTestTrait;
use RuntimeLoaderProvider; use RuntimeLoaderProvider;
/** /**
@ -34,7 +32,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
protected static $supportedFeatureSetVersion = 304; protected static $supportedFeatureSetVersion = 304;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\HttpKernelExtension; use Symfony\Bridge\Twig\Extension\HttpKernelExtension;
use Symfony\Bridge\Twig\Extension\HttpKernelRuntime; use Symfony\Bridge\Twig\Extension\HttpKernelRuntime;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
@ -23,8 +22,6 @@ use Twig\Loader\ArrayLoader;
class HttpKernelExtensionTest extends TestCase class HttpKernelExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testFragmentWithError() public function testFragmentWithError()
{ {
$this->expectException('Twig\Error\RuntimeError'); $this->expectException('Twig\Error\RuntimeError');

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\StopwatchExtension; use Symfony\Bridge\Twig\Extension\StopwatchExtension;
use Twig\Environment; use Twig\Environment;
use Twig\Error\RuntimeError; use Twig\Error\RuntimeError;
@ -20,8 +19,6 @@ use Twig\Loader\ArrayLoader;
class StopwatchExtensionTest extends TestCase class StopwatchExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testFailIfStoppingWrongEvent() public function testFailIfStoppingWrongEvent()
{ {
$this->expectException('Twig\Error\SyntaxError'); $this->expectException('Twig\Error\SyntaxError');

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\Loader\ArrayLoader;
use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\Translator;
@ -21,8 +20,6 @@ use Twig\Loader\ArrayLoader as TwigArrayLoader;
class TranslationExtensionTest extends TestCase class TranslationExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testEscaping() public function testEscaping()
{ {
$output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(['value' => 12, 'msg' => 'approx.']); $output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(['value' => 12, 'msg' => 'approx.']);

View File

@ -13,7 +13,6 @@ namespace Symfony\Bridge\Twig\Tests\Extension;
use Fig\Link\Link; use Fig\Link\Link;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\WebLinkExtension; use Symfony\Bridge\Twig\Extension\WebLinkExtension;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack;
@ -23,8 +22,6 @@ use Symfony\Component\HttpFoundation\RequestStack;
*/ */
class WebLinkExtensionTest extends TestCase class WebLinkExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var Request * @var Request
*/ */
@ -35,7 +32,7 @@ class WebLinkExtensionTest extends TestCase
*/ */
private $extension; private $extension;
private function doSetUp() protected function setUp()
{ {
$this->request = new Request(); $this->request = new Request();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\WorkflowExtension; use Symfony\Bridge\Twig\Extension\WorkflowExtension;
use Symfony\Component\Workflow\Definition; use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Registry; use Symfony\Component\Workflow\Registry;
@ -22,11 +21,9 @@ use Symfony\Component\Workflow\Workflow;
class WorkflowExtensionTest extends TestCase class WorkflowExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $extension; private $extension;
private function doSetUp() protected function setUp()
{ {
$places = ['ordered', 'waiting_for_payment', 'processed']; $places = ['ordered', 'waiting_for_payment', 'processed'];
$transitions = [ $transitions = [

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests\Translation; namespace Symfony\Bridge\Twig\Tests\Translation;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Translation\TwigExtractor; use Symfony\Bridge\Twig\Translation\TwigExtractor;
use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogue;
@ -22,8 +21,6 @@ use Twig\Loader\ArrayLoader;
class TwigExtractorTest extends TestCase class TwigExtractorTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @dataProvider getExtractData * @dataProvider getExtractData
*/ */

View File

@ -12,7 +12,6 @@
namespace Symfony\Bridge\Twig\Tests; namespace Symfony\Bridge\Twig\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bridge\Twig\TwigEngine; use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\Templating\TemplateReference; use Symfony\Component\Templating\TemplateReference;
use Twig\Environment; use Twig\Environment;
@ -20,8 +19,6 @@ use Twig\Loader\ArrayLoader;
class TwigEngineTest extends TestCase class TwigEngineTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testExistsWithTemplateInstances() public function testExistsWithTemplateInstances()
{ {
$engine = $this->getTwig(); $engine = $this->getTwig();

View File

@ -5,7 +5,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\CachedReader; use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Annotations\Reader; use Doctrine\Common\Annotations\Reader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer; use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter;
@ -16,11 +15,9 @@ use Symfony\Component\Filesystem\Filesystem;
class AnnotationsCacheWarmerTest extends TestCase class AnnotationsCacheWarmerTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $cacheDir; private $cacheDir;
private function doSetUp() protected function setUp()
{ {
$this->cacheDir = sys_get_temp_dir().'/'.uniqid(); $this->cacheDir = sys_get_temp_dir().'/'.uniqid();
$fs = new Filesystem(); $fs = new Filesystem();
@ -28,7 +25,7 @@ class AnnotationsCacheWarmerTest extends TestCase
parent::setUp(); parent::setUp();
} }
private function doTearDown() protected function tearDown()
{ {
$fs = new Filesystem(); $fs = new Filesystem();
$fs->remove($this->cacheDir); $fs->remove($this->cacheDir);

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer; use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter;
@ -23,8 +22,6 @@ use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
class SerializerCacheWarmerTest extends TestCase class SerializerCacheWarmerTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testWarmUp() public function testWarmUp()
{ {
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface; use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer; use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator; use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
@ -22,8 +21,6 @@ use Symfony\Component\Filesystem\Filesystem;
class TemplatePathsCacheWarmerTest extends TestCase class TemplatePathsCacheWarmerTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** @var Filesystem */ /** @var Filesystem */
private $filesystem; private $filesystem;
@ -38,7 +35,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
private $tmpDir; private $tmpDir;
private function doSetUp() protected function setUp()
{ {
$this->templateFinder = $this $this->templateFinder = $this
->getMockBuilder(TemplateFinderInterface::class) ->getMockBuilder(TemplateFinderInterface::class)
@ -59,7 +56,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
$this->filesystem->mkdir($this->tmpDir); $this->filesystem->mkdir($this->tmpDir);
} }
private function doTearDown() protected function tearDown()
{ {
$this->filesystem->remove($this->tmpDir); $this->filesystem->remove($this->tmpDir);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
use PHPUnit\Framework\Warning; use PHPUnit\Framework\Warning;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer; use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter;
@ -23,8 +22,6 @@ use Symfony\Component\Validator\ValidatorBuilder;
class ValidatorCacheWarmerTest extends TestCase class ValidatorCacheWarmerTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testWarmUp() public function testWarmUp()
{ {
if (\PHP_VERSION_ID >= 70400) { if (\PHP_VERSION_ID >= 70400) {

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand; namespace Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture\TestAppKernel; use Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture\TestAppKernel;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@ -24,15 +23,13 @@ use Symfony\Component\Finder\Finder;
class CacheClearCommandTest extends TestCase class CacheClearCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** @var TestAppKernel */ /** @var TestAppKernel */
private $kernel; private $kernel;
/** @var Filesystem */ /** @var Filesystem */
private $fs; private $fs;
private $rootDir; private $rootDir;
private function doSetUp() protected function setUp()
{ {
$this->fs = new Filesystem(); $this->fs = new Filesystem();
$this->kernel = new TestAppKernel('test', true); $this->kernel = new TestAppKernel('test', true);
@ -41,7 +38,7 @@ class CacheClearCommandTest extends TestCase
$this->fs->mkdir($this->rootDir); $this->fs->mkdir($this->rootDir);
} }
private function doTearDown() protected function tearDown()
{ {
$this->fs->remove($this->rootDir); $this->fs->remove($this->rootDir);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Command; namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand; use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Tester\CommandTester;
@ -22,8 +21,6 @@ use Symfony\Component\Routing\RouteCollection;
class RouterDebugCommandTest extends TestCase class RouterDebugCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testDebugAllRoutes() public function testDebugAllRoutes()
{ {
$tester = $this->createCommandTester(); $tester = $this->createCommandTester();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Command; namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Tester\CommandTester;
@ -21,8 +20,6 @@ use Symfony\Component\HttpKernel;
class TranslationDebugCommandTest extends TestCase class TranslationDebugCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $fs; private $fs;
private $translationDir; private $translationDir;
@ -110,7 +107,7 @@ class TranslationDebugCommandTest extends TestCase
$tester->execute(['locale' => 'en', 'bundle' => 'dir']); $tester->execute(['locale' => 'en', 'bundle' => 'dir']);
} }
private function doSetUp() protected function setUp()
{ {
$this->fs = new Filesystem(); $this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
@ -120,7 +117,7 @@ class TranslationDebugCommandTest extends TestCase
$this->fs->mkdir($this->translationDir.'/templates'); $this->fs->mkdir($this->translationDir.'/templates');
} }
private function doTearDown() protected function tearDown()
{ {
$this->fs->remove($this->translationDir); $this->fs->remove($this->translationDir);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Command; namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand; use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Tester\CommandTester;
@ -21,8 +20,6 @@ use Symfony\Component\HttpKernel;
class TranslationUpdateCommandTest extends TestCase class TranslationUpdateCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $fs; private $fs;
private $translationDir; private $translationDir;
@ -90,7 +87,7 @@ class TranslationUpdateCommandTest extends TestCase
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay()); $this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
} }
private function doSetUp() protected function setUp()
{ {
$this->fs = new Filesystem(); $this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
@ -100,7 +97,7 @@ class TranslationUpdateCommandTest extends TestCase
$this->fs->mkdir($this->translationDir.'/templates'); $this->fs->mkdir($this->translationDir.'/templates');
} }
private function doTearDown() protected function tearDown()
{ {
$this->fs->remove($this->translationDir); $this->fs->remove($this->translationDir);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Command; namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand; use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Application as BaseApplication; use Symfony\Component\Console\Application as BaseApplication;
@ -29,8 +28,6 @@ use Symfony\Component\HttpKernel\KernelInterface;
*/ */
class YamlLintCommandTest extends TestCase class YamlLintCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $files; private $files;
public function testLintCorrectFile() public function testLintCorrectFile()
@ -184,13 +181,13 @@ EOF;
return $application; return $application;
} }
private function doSetUp() protected function setUp()
{ {
@mkdir(sys_get_temp_dir().'/yml-lint-test'); @mkdir(sys_get_temp_dir().'/yml-lint-test');
$this->files = []; $this->files = [];
} }
private function doTearDown() protected function tearDown()
{ {
foreach ($this->files as $file) { foreach ($this->files as $file) {
if (file_exists($file)) { if (file_exists($file)) {

View File

@ -11,19 +11,16 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor;
class TextDescriptorTest extends AbstractDescriptorTest class TextDescriptorTest extends AbstractDescriptorTest
{ {
use ForwardCompatTestTrait; protected function setUp()
private function doSetUp()
{ {
putenv('COLUMNS=121'); putenv('COLUMNS=121');
} }
private function doTearDown() protected function tearDown()
{ {
putenv('COLUMNS'); putenv('COLUMNS');
} }

View File

@ -12,18 +12,15 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser; use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\Kernel;
class ControllerNameParserTest extends TestCase class ControllerNameParserTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $loader; protected $loader;
private function doSetUp() protected function setUp()
{ {
$this->loader = new ClassLoader(); $this->loader = new ClassLoader();
$this->loader->add('TestBundle', __DIR__.'/../Fixtures'); $this->loader->add('TestBundle', __DIR__.'/../Fixtures');
@ -31,7 +28,7 @@ class ControllerNameParserTest extends TestCase
$this->loader->register(); $this->loader->register();
} }
private function doTearDown() protected function tearDown()
{ {
$this->loader->unregister(); $this->loader->unregister();
$this->loader = null; $this->loader = null;

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait; use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
@ -32,8 +31,6 @@ use Symfony\Component\Serializer\SerializerInterface;
abstract class ControllerTraitTest extends TestCase abstract class ControllerTraitTest extends TestCase
{ {
use ForwardCompatTestTrait;
abstract protected function createController(); abstract protected function createController();
public function testForward() public function testForward()

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; use Symfony\Bundle\FrameworkBundle\Controller\TemplateController;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@ -21,8 +20,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
*/ */
class TemplateControllerTest extends TestCase class TemplateControllerTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testTwig() public function testTwig()
{ {
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock(); $twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -23,8 +22,6 @@ use Symfony\Component\DependencyInjection\Definition;
*/ */
class AddConsoleCommandPassTest extends TestCase class AddConsoleCommandPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @dataProvider visibilityProvider * @dataProvider visibilityProvider
*/ */

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -25,8 +24,6 @@ use Symfony\Component\DependencyInjection\ServiceLocator;
*/ */
class AddConstraintValidatorsPassTest extends TestCase class AddConstraintValidatorsPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testThatConstraintValidatorServicesAreProcessed() public function testThatConstraintValidatorServicesAreProcessed()
{ {
$container = new ContainerBuilder(); $container = new ContainerBuilder();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass;
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ChildDefinition;
@ -22,11 +21,9 @@ use Symfony\Component\DependencyInjection\Reference;
class CachePoolPassTest extends TestCase class CachePoolPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $cachePoolPass; private $cachePoolPass;
private function doSetUp() protected function setUp()
{ {
$this->cachePoolPass = new CachePoolPass(); $this->cachePoolPass = new CachePoolPass();
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPrunerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPrunerPass;
use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\PhpFilesAdapter; use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
@ -22,8 +21,6 @@ use Symfony\Component\DependencyInjection\Reference;
class CachePoolPrunerPassTest extends TestCase class CachePoolPrunerPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testCompilerPassReplacesCommandArgument() public function testCompilerPassReplacesCommandArgument()
{ {
$container = new ContainerBuilder(); $container = new ContainerBuilder();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
@ -20,12 +19,10 @@ use Symfony\Component\Translation\TranslatorInterface;
class DataCollectorTranslatorPassTest extends TestCase class DataCollectorTranslatorPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $container; private $container;
private $dataCollectorTranslatorPass; private $dataCollectorTranslatorPass;
private function doSetUp() protected function setUp()
{ {
$this->container = new ContainerBuilder(); $this->container = new ContainerBuilder();
$this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass(); $this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
@ -25,8 +24,6 @@ use Symfony\Component\DependencyInjection\Reference;
*/ */
class FormPassTest extends TestCase class FormPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testDoNothingIfFormExtensionNotLoaded() public function testDoNothingIfFormExtensionNotLoaded()
{ {
$container = new ContainerBuilder(); $container = new ContainerBuilder();

View File

@ -12,14 +12,11 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
class ProfilerPassTest extends TestCase class ProfilerPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* Tests that collectors that specify a template but no "id" will throw * Tests that collectors that specify a template but no "id" will throw
* an exception (both are needed if the template is specified). * an exception (both are needed if the template is specified).

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
@ -26,8 +25,6 @@ use Symfony\Component\DependencyInjection\Reference;
*/ */
class SerializerPassTest extends TestCase class SerializerPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testThrowExceptionWhenNoNormalizers() public function testThrowExceptionWhenNoNormalizers()
{ {
$this->expectException('RuntimeException'); $this->expectException('RuntimeException');

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
@ -23,12 +22,10 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
class WorkflowGuardListenerPassTest extends TestCase class WorkflowGuardListenerPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $container; private $container;
private $compilerPass; private $compilerPass;
private function doSetUp() protected function setUp()
{ {
$this->container = new ContainerBuilder(); $this->container = new ContainerBuilder();
$this->compilerPass = new WorkflowGuardListenerPass(); $this->compilerPass = new WorkflowGuardListenerPass();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration;
use Symfony\Bundle\FullStack; use Symfony\Bundle\FullStack;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
@ -21,8 +20,6 @@ use Symfony\Component\Lock\Store\SemaphoreStore;
class ConfigurationTest extends TestCase class ConfigurationTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testDefaultConfig() public function testDefaultConfig()
{ {
$processor = new Processor(); $processor = new Processor();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
use Doctrine\Common\Annotations\Annotation; use Doctrine\Common\Annotations\Annotation;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@ -48,8 +47,6 @@ use Symfony\Component\Workflow\Registry;
abstract class FrameworkExtensionTest extends TestCase abstract class FrameworkExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
private static $containerCache = []; private static $containerCache = [];
abstract protected function loadFromFile(ContainerBuilder $container, $file); abstract protected function loadFromFile(ContainerBuilder $container, $file);

View File

@ -11,15 +11,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection; namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
class PhpFrameworkExtensionTest extends FrameworkExtensionTest class PhpFrameworkExtensionTest extends FrameworkExtensionTest
{ {
use ForwardCompatTestTrait;
protected function loadFromFile(ContainerBuilder $container, $file) protected function loadFromFile(ContainerBuilder $container, $file)
{ {
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php')); $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php'));

View File

@ -11,26 +11,23 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
abstract class AbstractWebTestCase extends BaseWebTestCase abstract class AbstractWebTestCase extends BaseWebTestCase
{ {
use ForwardCompatTestTrait;
public static function assertRedirect($response, $location) public static function assertRedirect($response, $location)
{ {
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode()); self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode());
self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
} }
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Tester\CommandTester;
@ -21,9 +20,7 @@ use Symfony\Component\Console\Tester\CommandTester;
*/ */
class CachePoolClearCommandTest extends AbstractWebTestCase class CachePoolClearCommandTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait; protected function setUp()
private function doSetUp()
{ {
static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']); static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']);
} }

View File

@ -11,15 +11,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Adapter\RedisAdapter;
use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Exception\InvalidArgumentException;
class CachePoolsTest extends AbstractWebTestCase class CachePoolsTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait;
public function testCachePools() public function testCachePools()
{ {
$this->doTestCachePools([], AdapterInterface::class); $this->doTestCachePools([], AdapterInterface::class);

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\NullOutput;
@ -22,11 +21,9 @@ use Symfony\Component\Console\Tester\CommandTester;
*/ */
class ConfigDebugCommandTest extends AbstractWebTestCase class ConfigDebugCommandTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait;
private $application; private $application;
private function doSetUp() protected function setUp()
{ {
$kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']);
$this->application = new Application($kernel); $this->application = new Application($kernel);

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\NullOutput;
@ -22,11 +21,9 @@ use Symfony\Component\Console\Tester\CommandTester;
*/ */
class ConfigDumpReferenceCommandTest extends AbstractWebTestCase class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait;
private $application; private $application;
private function doSetUp() protected function setUp()
{ {
$kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']);
$this->application = new Application($kernel); $this->application = new Application($kernel);

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing; namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Routing\Router; use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource; use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Route;
@ -20,8 +19,6 @@ use Symfony\Component\Routing\RouteCollection;
class RouterTest extends TestCase class RouterTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testGenerateWithServiceParam() public function testGenerateWithServiceParam()
{ {
$routes = new RouteCollection(); $routes = new RouteCollection();

View File

@ -12,14 +12,11 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine; use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
class DelegatingEngineTest extends TestCase class DelegatingEngineTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testSupportsRetrievesEngineFromTheContainer() public function testSupportsRetrievesEngineFromTheContainer()
{ {
$container = $this->getContainerMock([ $container = $this->getContainerMock([

View File

@ -11,19 +11,16 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
class GlobalVariablesTest extends TestCase class GlobalVariablesTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $container; private $container;
private $globals; private $globals;
private function doSetUp() protected function setUp()
{ {
$this->container = new Container(); $this->container = new Container();
$this->globals = new GlobalVariables($this->container); $this->globals = new GlobalVariables($this->container);

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper; use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;
use Symfony\Component\Asset\Package; use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\Packages;
@ -20,11 +19,9 @@ use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class AssetsHelperTest extends TestCase class AssetsHelperTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $helper; private $helper;
private function doSetUp() protected function setUp()
{ {
$fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s')); $fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s'));
$barPackage = new Package(new StaticVersionStrategy('22', '%s?%s')); $barPackage = new Package(new StaticVersionStrategy('22', '%s?%s'));

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper; use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser; use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator; use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
@ -23,8 +22,6 @@ use Symfony\Component\Templating\PhpEngine;
class FormHelperDivLayoutTest extends AbstractDivLayoutTest class FormHelperDivLayoutTest extends AbstractDivLayoutTest
{ {
use ForwardCompatTestTrait;
/** /**
* @var PhpEngine * @var PhpEngine
*/ */
@ -55,7 +52,7 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
]); ]);
} }
private function doTearDown() protected function tearDown()
{ {
$this->engine = null; $this->engine = null;

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper; use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser; use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser;
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator; use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
@ -23,8 +22,6 @@ use Symfony\Component\Templating\PhpEngine;
class FormHelperTableLayoutTest extends AbstractTableLayoutTest class FormHelperTableLayoutTest extends AbstractTableLayoutTest
{ {
use ForwardCompatTestTrait;
/** /**
* @var PhpEngine * @var PhpEngine
*/ */
@ -80,7 +77,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
]); ]);
} }
private function doTearDown() protected function tearDown()
{ {
$this->engine = null; $this->engine = null;

View File

@ -12,18 +12,15 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper; use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack;
class RequestHelperTest extends TestCase class RequestHelperTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $requestStack; protected $requestStack;
private function doSetUp() protected function setUp()
{ {
$this->requestStack = new RequestStack(); $this->requestStack = new RequestStack();
$request = new Request(); $request = new Request();

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper; use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack;
@ -21,11 +20,9 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
class SessionHelperTest extends TestCase class SessionHelperTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $requestStack; protected $requestStack;
private function doSetUp() protected function setUp()
{ {
$request = new Request(); $request = new Request();
@ -39,7 +36,7 @@ class SessionHelperTest extends TestCase
$this->requestStack->push($request); $this->requestStack->push($request);
} }
private function doTearDown() protected function tearDown()
{ {
$this->requestStack = null; $this->requestStack = null;
} }

View File

@ -11,15 +11,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Loader; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Loader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator; use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
class TemplateLocatorTest extends TestCase class TemplateLocatorTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testLocateATemplate() public function testLocateATemplate()
{ {
$template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine'); $template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine');

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
use Symfony\Bundle\FrameworkBundle\Templating\PhpEngine; use Symfony\Bundle\FrameworkBundle\Templating\PhpEngine;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@ -24,8 +23,6 @@ use Symfony\Component\Templating\TemplateNameParser;
class PhpEngineTest extends TestCase class PhpEngineTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testEvaluateAddsAppGlobal() public function testEvaluateAddsAppGlobal()
{ {
$container = $this->getContainer(); $container = $this->getContainer();

View File

@ -11,23 +11,20 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser; use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
class TemplateFilenameParserTest extends TestCase class TemplateFilenameParserTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $parser; protected $parser;
private function doSetUp() protected function setUp()
{ {
$this->parser = new TemplateFilenameParser(); $this->parser = new TemplateFilenameParser();
} }
private function doTearDown() protected function tearDown()
{ {
$this->parser = null; $this->parser = null;
} }

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser; use Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@ -19,11 +18,9 @@ use Symfony\Component\Templating\TemplateReference as BaseTemplateReference;
class TemplateNameParserTest extends TestCase class TemplateNameParserTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $parser; protected $parser;
private function doSetUp() protected function setUp()
{ {
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock();
$kernel $kernel
@ -40,7 +37,7 @@ class TemplateNameParserTest extends TestCase
$this->parser = new TemplateNameParser($kernel); $this->parser = new TemplateNameParser($kernel);
} }
private function doTearDown() protected function tearDown()
{ {
$this->parser = null; $this->parser = null;
} }

View File

@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Translation\Translator; use Symfony\Bundle\FrameworkBundle\Translation\Translator;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Translation\Formatter\MessageFormatter; use Symfony\Component\Translation\Formatter\MessageFormatter;
@ -21,17 +20,15 @@ use Symfony\Component\Translation\MessageCatalogue;
class TranslatorTest extends TestCase class TranslatorTest extends TestCase
{ {
use ForwardCompatTestTrait;
protected $tmpDir; protected $tmpDir;
private function doSetUp() protected function setUp()
{ {
$this->tmpDir = sys_get_temp_dir().'/sf2_translation'; $this->tmpDir = sys_get_temp_dir().'/sf2_translation';
$this->deleteTmpDir(); $this->deleteTmpDir();
} }
private function doTearDown() protected function tearDown()
{ {
$this->deleteTmpDir(); $this->deleteTmpDir();
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Validator; namespace Symfony\Bundle\FrameworkBundle\Tests\Validator;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory; use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraint;
@ -24,8 +23,6 @@ use Symfony\Component\Validator\ConstraintValidator;
*/ */
class ConstraintValidatorFactoryTest extends TestCase class ConstraintValidatorFactoryTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testGetInstanceCreatesValidator() public function testGetInstanceCreatesValidator()
{ {
$factory = new ConstraintValidatorFactory(new Container()); $factory = new ConstraintValidatorFactory(new Container());

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass; use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Component\DependencyInjection\Exception\LogicException;
@ -22,8 +21,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
class AddSecurityVotersPassTest extends TestCase class AddSecurityVotersPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testNoVoters() public function testNoVoters()
{ {
$this->expectException('Symfony\Component\DependencyInjection\Exception\LogicException'); $this->expectException('Symfony\Component\DependencyInjection\Exception\LogicException');

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@ -23,8 +22,6 @@ use Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder;
abstract class CompleteConfigurationTest extends TestCase abstract class CompleteConfigurationTest extends TestCase
{ {
use ForwardCompatTestTrait;
abstract protected function getLoader(ContainerBuilder $container); abstract protected function getLoader(ContainerBuilder $container);
abstract protected function getFileExtension(); abstract protected function getFileExtension();

View File

@ -12,14 +12,11 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration; use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration;
use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\Definition\Processor;
class MainConfigurationTest extends TestCase class MainConfigurationTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* The minimal, required config needed to not have any required validation * The minimal, required config needed to not have any required validation
* issues. * issues.

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory; namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory; use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@ -21,8 +20,6 @@ use Symfony\Component\DependencyInjection\Reference;
class GuardAuthenticationFactoryTest extends TestCase class GuardAuthenticationFactoryTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @dataProvider getValidConfigurationTests * @dataProvider getValidConfigurationTests
*/ */

View File

@ -12,7 +12,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection; namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\DummyProvider; use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\DummyProvider;
@ -20,8 +19,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
class SecurityExtensionTest extends TestCase class SecurityExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testInvalidCheckPath() public function testInvalidCheckPath()
{ {
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');

View File

@ -11,26 +11,23 @@
namespace Symfony\Bundle\SecurityBundle\Tests\Functional; namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
class AbstractWebTestCase extends BaseWebTestCase class AbstractWebTestCase extends BaseWebTestCase
{ {
use ForwardCompatTestTrait;
public static function assertRedirect($response, $location) public static function assertRedirect($response, $location)
{ {
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000)); self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.substr($response, 0, 2000));
self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
} }
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\SecurityBundle\Tests\Functional; namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand; use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand;
use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\Console\Application as ConsoleApplication;
@ -28,8 +27,6 @@ use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
*/ */
class UserPasswordEncoderCommandTest extends AbstractWebTestCase class UserPasswordEncoderCommandTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait;
/** @var CommandTester */ /** @var CommandTester */
private $passwordEncoderCommandTester; private $passwordEncoderCommandTester;
@ -246,7 +243,7 @@ EOTXT
$this->assertContains('Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', $tester->getDisplay()); $this->assertContains('Encoder used Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', $tester->getDisplay());
} }
private function doSetUp() protected function setUp()
{ {
putenv('COLUMNS='.(119 + \strlen(PHP_EOL))); putenv('COLUMNS='.(119 + \strlen(PHP_EOL)));
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']); $kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
@ -259,7 +256,7 @@ EOTXT
$this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand); $this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand);
} }
private function doTearDown() protected function tearDown()
{ {
$this->passwordEncoderCommandTester = null; $this->passwordEncoderCommandTester = null;
} }

View File

@ -12,15 +12,12 @@
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler; namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
class TwigLoaderPassTest extends TestCase class TwigLoaderPassTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var ContainerBuilder * @var ContainerBuilder
*/ */
@ -34,7 +31,7 @@ class TwigLoaderPassTest extends TestCase
*/ */
private $pass; private $pass;
private function doSetUp() protected function setUp()
{ {
$this->builder = new ContainerBuilder(); $this->builder = new ContainerBuilder();
$this->builder->register('twig'); $this->builder->register('twig');

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\TwigBundle\Tests\Functional; namespace Symfony\Bundle\TwigBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\Tests\TestCase;
use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Bundle\TwigBundle\TwigBundle;
@ -21,8 +20,6 @@ use Symfony\Component\HttpKernel\Kernel;
class CacheWarmingTest extends TestCase class CacheWarmingTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable() public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
{ {
$kernel = new CacheWarmingKernel(true); $kernel = new CacheWarmingKernel(true);
@ -47,12 +44,12 @@ class CacheWarmingTest extends TestCase
$this->assertFileExists($kernel->getCacheDir().'/twig'); $this->assertFileExists($kernel->getCacheDir().'/twig');
} }
private function doSetUp() protected function setUp()
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }
private function doTearDown() protected function tearDown()
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\TwigBundle\Tests\Functional; namespace Symfony\Bundle\TwigBundle\Tests\Functional;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\Tests\TestCase;
use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Bundle\TwigBundle\TwigBundle;
@ -21,8 +20,6 @@ use Symfony\Component\HttpKernel\Kernel;
class NoTemplatingEntryTest extends TestCase class NoTemplatingEntryTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function test() public function test()
{ {
$kernel = new NoTemplatingEntryKernel('dev', true); $kernel = new NoTemplatingEntryKernel('dev', true);
@ -33,12 +30,12 @@ class NoTemplatingEntryTest extends TestCase
$this->assertContains('{ a: b }', $content); $this->assertContains('{ a: b }', $content);
} }
private function doSetUp() protected function setUp()
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }
private function doTearDown() protected function tearDown()
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }

View File

@ -11,15 +11,12 @@
namespace Symfony\Bundle\TwigBundle\Tests\Loader; namespace Symfony\Bundle\TwigBundle\Tests\Loader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader; use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\Tests\TestCase;
class FilesystemLoaderTest extends TestCase class FilesystemLoaderTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testGetSourceContext() public function testGetSourceContext()
{ {
$parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock(); $parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection; namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\WebProfilerBundle\DependencyInjection\WebProfilerExtension; use Symfony\Bundle\WebProfilerBundle\DependencyInjection\WebProfilerExtension;
use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; use Symfony\Bundle\WebProfilerBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
@ -23,8 +22,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
class WebProfilerExtensionTest extends TestCase class WebProfilerExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $kernel; private $kernel;
/** /**
* @var \Symfony\Component\DependencyInjection\Container * @var \Symfony\Component\DependencyInjection\Container
@ -49,7 +46,7 @@ class WebProfilerExtensionTest extends TestCase
self::assertEquals([], $errors, $message); self::assertEquals([], $errors, $message);
} }
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
@ -76,7 +73,7 @@ class WebProfilerExtensionTest extends TestCase
$this->container->addCompilerPass(new RegisterListenersPass()); $this->container->addCompilerPass(new RegisterListenersPass());
} }
private function doTearDown() protected function tearDown()
{ {
parent::tearDown(); parent::tearDown();

View File

@ -11,7 +11,6 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Profiler; namespace Symfony\Bundle\WebProfilerBundle\Tests\Profiler;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; use Symfony\Bundle\WebProfilerBundle\Tests\TestCase;
use Symfony\Component\HttpKernel\Profiler\Profile; use Symfony\Component\HttpKernel\Profiler\Profile;
@ -24,8 +23,6 @@ use Twig\Environment;
*/ */
class TemplateManagerTest extends TestCase class TemplateManagerTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var Environment * @var Environment
*/ */
@ -41,7 +38,7 @@ class TemplateManagerTest extends TestCase
*/ */
protected $templateManager; protected $templateManager;
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -12,15 +12,12 @@
namespace Symfony\Component\Asset\Tests; namespace Symfony\Component\Asset\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Asset\Package; use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\Packages;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class PackagesTest extends TestCase class PackagesTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testGetterSetters() public function testGetterSetters()
{ {
$packages = new Packages(); $packages = new Packages();

View File

@ -12,15 +12,12 @@
namespace Symfony\Component\Asset\Tests; namespace Symfony\Component\Asset\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\UrlPackage;
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class UrlPackageTest extends TestCase class UrlPackageTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @dataProvider getConfigs * @dataProvider getConfigs
*/ */

View File

@ -12,13 +12,10 @@
namespace Symfony\Component\Asset\Tests\VersionStrategy; namespace Symfony\Component\Asset\Tests\VersionStrategy;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy; use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy;
class JsonManifestVersionStrategyTest extends TestCase class JsonManifestVersionStrategyTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testGetVersion() public function testGetVersion()
{ {
$strategy = $this->createStrategy('manifest-valid.json'); $strategy = $this->createStrategy('manifest-valid.json');

View File

@ -12,13 +12,10 @@
namespace Symfony\Component\BrowserKit\Tests; namespace Symfony\Component\BrowserKit\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\BrowserKit\Cookie; use Symfony\Component\BrowserKit\Cookie;
class CookieTest extends TestCase class CookieTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testToString() public function testToString()
{ {
$cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true); $cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true);

View File

@ -11,13 +11,10 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Adapter\RedisAdapter;
abstract class AbstractRedisAdapterTest extends AdapterTestCase abstract class AbstractRedisAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
protected $skippedTests = [ protected $skippedTests = [
'testExpiration' => 'Testing expiration slows down the test suite', 'testExpiration' => 'Testing expiration slows down the test suite',
'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite',
@ -31,7 +28,7 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime);
} }
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
if (!\extension_loaded('redis')) { if (!\extension_loaded('redis')) {
self::markTestSkipped('Extension redis required.'); self::markTestSkipped('Extension redis required.');
@ -42,7 +39,7 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
} }
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
self::$redis = null; self::$redis = null;
} }

View File

@ -13,14 +13,11 @@ namespace Symfony\Component\Cache\Tests\Adapter;
use Cache\IntegrationTests\CachePoolTest; use Cache\IntegrationTests\CachePoolTest;
use Psr\Cache\CacheItemPoolInterface; use Psr\Cache\CacheItemPoolInterface;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\PruneableInterface; use Symfony\Component\Cache\PruneableInterface;
abstract class AdapterTestCase extends CachePoolTest abstract class AdapterTestCase extends CachePoolTest
{ {
use ForwardCompatTestTrait; protected function setUp()
private function doSetUp()
{ {
parent::setUp(); parent::setUp();

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\ChainAdapter; use Symfony\Component\Cache\Adapter\ChainAdapter;
@ -25,8 +24,6 @@ use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
*/ */
class ChainAdapterTest extends AdapterTestCase class ChainAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
public function createCachePool($defaultLifetime = 0) public function createCachePool($defaultLifetime = 0)
{ {
return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime); return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime);

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Psr\Cache\CacheItemPoolInterface; use Psr\Cache\CacheItemPoolInterface;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter;
/** /**
@ -20,14 +19,12 @@ use Symfony\Component\Cache\Adapter\FilesystemAdapter;
*/ */
class FilesystemAdapterTest extends AdapterTestCase class FilesystemAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
public function createCachePool($defaultLifetime = 0) public function createCachePool($defaultLifetime = 0)
{ {
return new FilesystemAdapter('', $defaultLifetime); return new FilesystemAdapter('', $defaultLifetime);
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
self::rmdir(sys_get_temp_dir().'/symfony-cache'); self::rmdir(sys_get_temp_dir().'/symfony-cache');
} }

View File

@ -12,13 +12,10 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Adapter\AbstractAdapter;
class MaxIdLengthAdapterTest extends TestCase class MaxIdLengthAdapterTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testLongKey() public function testLongKey()
{ {
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class) $cache = $this->getMockBuilder(MaxIdLengthAdapter::class)

Some files were not shown because too many files have changed in this diff Show More