Merge branch '4.3' into 4.4

* 4.3:
  Remove use of ForwardCompatTrait
  Remove deprecated methods assertArraySubset
This commit is contained in:
Nicolas Grekas 2019-08-03 23:59:26 +02:00
commit d588be203a
654 changed files with 506 additions and 2443 deletions

View File

@ -19,6 +19,7 @@ env:
global: global:
- MIN_PHP=7.1.3 - MIN_PHP=7.1.3
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
- MESSENGER_AMQP_DSN=amqp://localhost/%2f/messages - MESSENGER_AMQP_DSN=amqp://localhost/%2f/messages
- MESSENGER_REDIS_DSN=redis://127.0.0.1:7001/messages - MESSENGER_REDIS_DSN=redis://127.0.0.1:7001/messages

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,7 +13,6 @@ 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\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
@ -22,8 +21,6 @@ use Symfony\Component\DependencyInjection\ServiceLocator;
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

@ -19,7 +19,6 @@ 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\Doctrine\Tests\Fixtures\SingleIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
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;
@ -28,8 +27,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
*/ */
@ -75,7 +72,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,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,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\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface; use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
@ -24,8 +23,6 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
*/ */
class ProxyDumperTest extends TestCase class ProxyDumperTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** /**
* @var ProxyDumper * @var ProxyDumper
*/ */
@ -34,7 +31,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()
@ -96,12 +93,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 = 404; protected static $supportedFeatureSetVersion = 404;
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 = 404; protected static $supportedFeatureSetVersion = 404;
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\MarkingStore\MethodMarkingStore; use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
@ -26,12 +25,10 @@ use Symfony\Component\Workflow\Workflow;
class WorkflowExtensionTest extends TestCase class WorkflowExtensionTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $extension; private $extension;
private $t1; private $t1;
private function doSetUp() protected function setUp()
{ {
if (!class_exists(Workflow::class)) { if (!class_exists(Workflow::class)) {
$this->markTestSkipped('The Workflow component is needed to run tests for this extension.'); $this->markTestSkipped('The Workflow component is needed to run tests for this extension.');

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;
@ -23,8 +22,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;
@ -23,8 +22,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\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
@ -15,11 +14,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();
@ -27,7 +24,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\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
@ -22,8 +21,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;
@ -25,8 +24,6 @@ use Symfony\Component\Filesystem\Filesystem;
*/ */
class TemplatePathsCacheWarmerTest extends TestCase class TemplatePathsCacheWarmerTest extends TestCase
{ {
use ForwardCompatTestTrait;
/** @var Filesystem */ /** @var Filesystem */
private $filesystem; private $filesystem;
@ -41,7 +38,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)
@ -62,7 +59,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\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
@ -22,8 +21,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,21 +23,19 @@ 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 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);
$this->fs->mkdir($this->kernel->getProjectDir()); $this->fs->mkdir($this->kernel->getProjectDir());
} }
private function doTearDown() protected function tearDown()
{ {
$this->fs->remove($this->kernel->getProjectDir()); $this->fs->remove($this->kernel->getProjectDir());
} }

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;
@ -22,8 +21,6 @@ use Symfony\Component\HttpKernel;
class TranslationDebugCommandTest extends TestCase class TranslationDebugCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $fs; private $fs;
private $translationDir; private $translationDir;
@ -130,7 +127,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('sf_translation', true); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
@ -138,7 +135,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;
@ -22,8 +21,6 @@ use Symfony\Component\HttpKernel;
class TranslationUpdateCommandTest extends TestCase class TranslationUpdateCommandTest extends TestCase
{ {
use ForwardCompatTestTrait;
private $fs; private $fs;
private $translationDir; private $translationDir;
@ -108,7 +105,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('sf_translation', true); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
@ -116,7 +113,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,7 +12,6 @@
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;
@ -22,11 +21,9 @@ 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');
@ -34,7 +31,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

@ -12,7 +12,6 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller; namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Fig\Link\Link; use Fig\Link\Link;
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;
@ -33,8 +32,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\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;
@ -25,11 +24,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;
@ -25,8 +24,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\Contracts\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,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\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

@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
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;
@ -25,8 +24,6 @@ use Symfony\Component\Messenger\MessageBusInterface;
class ConfigurationTest extends TestCase class ConfigurationTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testDefaultConfig() public function testDefaultConfig()
{ {
$processor = new Processor(); $processor = new Processor();

View File

@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
use Doctrine\Common\Annotations\Annotation; use Doctrine\Common\Annotations\Annotation;
use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareInterface;
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;
@ -60,8 +59,6 @@ use Symfony\Component\Workflow;
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,7 +11,6 @@
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\Adapter\TagAwareAdapter; use Symfony\Component\Cache\Adapter\TagAwareAdapter;
@ -19,8 +18,6 @@ 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

@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
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\Routing\Router; use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource; use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
@ -22,8 +21,6 @@ use Symfony\Component\Routing\RouteCollection;
class RouterTest extends TestCase class RouterTest extends TestCase
{ {
use ForwardCompatTestTrait;
public function testConstructThrowsOnNonSymfonyNorPsr11Container() public function testConstructThrowsOnNonSymfonyNorPsr11Container()
{ {
$this->expectException('LogicException'); $this->expectException('LogicException');

View File

@ -12,7 +12,6 @@
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;
@ -21,8 +20,6 @@ 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,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\Tests\TestCase; use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
@ -21,12 +20,10 @@ 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;
@ -23,11 +22,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;
@ -26,8 +25,6 @@ use Symfony\Component\Templating\PhpEngine;
*/ */
class FormHelperDivLayoutTest extends AbstractDivLayoutTest class FormHelperDivLayoutTest extends AbstractDivLayoutTest
{ {
use ForwardCompatTestTrait;
/** /**
* @var PhpEngine * @var PhpEngine
*/ */
@ -58,7 +55,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;
@ -26,8 +25,6 @@ use Symfony\Component\Templating\PhpEngine;
*/ */
class FormHelperTableLayoutTest extends AbstractTableLayoutTest class FormHelperTableLayoutTest extends AbstractTableLayoutTest
{ {
use ForwardCompatTestTrait;
/** /**
* @var PhpEngine * @var PhpEngine
*/ */
@ -103,7 +100,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
]); ]);
} }
private function doTearDown() protected function tearDown()
{ {
$this->engine = null; $this->engine = null;

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\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;
@ -22,11 +21,9 @@ 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;
@ -24,11 +23,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();
@ -42,7 +39,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,7 +11,6 @@
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;
@ -21,8 +20,6 @@ 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;
@ -27,8 +26,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,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\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;
@ -21,16 +20,14 @@ 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;
@ -22,11 +21,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
@ -43,7 +40,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\Config\Resource\DirectoryResource; use Symfony\Component\Config\Resource\DirectoryResource;
use Symfony\Component\Config\Resource\FileExistenceResource; use Symfony\Component\Config\Resource\FileExistenceResource;
@ -23,17 +22,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().'/sf_translation'; $this->tmpDir = sys_get_temp_dir().'/sf_translation';
$this->deleteTmpDir(); $this->deleteTmpDir();
} }
private function doTearDown() protected function tearDown()
{ {
$this->deleteTmpDir(); $this->deleteTmpDir();
} }

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\Definition; use Symfony\Component\DependencyInjection\Definition;
@ -23,8 +22,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;
@ -24,8 +23,6 @@ use Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder;
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\FrameworkBundle\DependencyInjection\FrameworkExtension; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle;
@ -25,8 +24,6 @@ use Symfony\Component\Security\Core\User\UserProviderInterface;
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;
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: '.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

@ -70,6 +70,6 @@ class JsonLoginTest extends AbstractWebTestCase
$this->assertSame(400, $response->getStatusCode()); $this->assertSame(400, $response->getStatusCode());
$this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertSame('application/json', $response->headers->get('Content-Type'));
$this->assertArraySubset(['title' => 'Bad Request', 'status' => 400, 'detail' => 'Invalid JSON.'], json_decode($response->getContent(), true)); $this->assertSame(['title' => 'Bad Request', 'status' => 400, 'detail' => 'Invalid JSON.'], json_decode($response->getContent(), true));
} }
} }

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;
@ -30,8 +29,6 @@ use Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder;
*/ */
class UserPasswordEncoderCommandTest extends AbstractWebTestCase class UserPasswordEncoderCommandTest extends AbstractWebTestCase
{ {
use ForwardCompatTestTrait;
/** @var CommandTester */ /** @var CommandTester */
private $passwordEncoderCommandTester; private $passwordEncoderCommandTester;
@ -289,7 +286,7 @@ EOTXT
], ['interactive' => false]); ], ['interactive' => false]);
} }
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']);
@ -302,7 +299,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;
@ -24,8 +23,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);
@ -50,12 +47,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,7 +11,6 @@
namespace Symfony\Bundle\TwigBundle\Tests\Loader; namespace Symfony\Bundle\TwigBundle\Tests\Loader;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader; use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\Tests\TestCase;
use Symfony\Component\Templating\TemplateReferenceInterface; use Symfony\Component\Templating\TemplateReferenceInterface;
@ -21,8 +20,6 @@ use Symfony\Component\Templating\TemplateReferenceInterface;
*/ */
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;
@ -24,8 +23,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
@ -50,7 +47,7 @@ class WebProfilerExtensionTest extends TestCase
self::assertEquals([], $errors, $message); self::assertEquals([], $errors, $message);
} }
private function doSetUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
@ -78,7 +75,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

@ -15,16 +15,13 @@ use Cache\IntegrationTests\CachePoolTest;
use PHPUnit\Framework\Assert; use PHPUnit\Framework\Assert;
use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface; use Psr\Cache\CacheItemPoolInterface;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\CacheItem; use Symfony\Component\Cache\CacheItem;
use Symfony\Component\Cache\PruneableInterface; use Symfony\Component\Cache\PruneableInterface;
use Symfony\Contracts\Cache\CallbackInterface; use Symfony\Contracts\Cache\CallbackInterface;
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, $testMethod = null) public function createCachePool($defaultLifetime = 0, $testMethod = null)
{ {
if ('testGetMetadata' === $testMethod) { if ('testGetMetadata' === $testMethod) {

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)

View File

@ -11,14 +11,11 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Adapter\AbstractAdapter;
use Symfony\Component\Cache\Adapter\MemcachedAdapter; use Symfony\Component\Cache\Adapter\MemcachedAdapter;
class MemcachedAdapterTest extends AdapterTestCase class MemcachedAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
protected $skippedTests = [ protected $skippedTests = [
'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite',
'testDefaultLifeTime' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite',
@ -27,7 +24,7 @@ class MemcachedAdapterTest extends AdapterTestCase
protected static $client; protected static $client;
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
if (!MemcachedAdapter::isSupported()) { if (!MemcachedAdapter::isSupported()) {
self::markTestSkipped('Extension memcached >=2.2.0 required.'); self::markTestSkipped('Extension memcached >=2.2.0 required.');

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\PdoAdapter; use Symfony\Component\Cache\Adapter\PdoAdapter;
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@ -20,12 +19,11 @@ use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
*/ */
class PdoAdapterTest extends AdapterTestCase class PdoAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
use PdoPruneableTrait; use PdoPruneableTrait;
protected static $dbFile; protected static $dbFile;
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -37,7 +35,7 @@ class PdoAdapterTest extends AdapterTestCase
$pool->createTable(); $pool->createTable();
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\DriverManager;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\PdoAdapter; use Symfony\Component\Cache\Adapter\PdoAdapter;
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@ -21,12 +20,11 @@ use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
*/ */
class PdoDbalAdapterTest extends AdapterTestCase class PdoDbalAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
use PdoPruneableTrait; use PdoPruneableTrait;
protected static $dbFile; protected static $dbFile;
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -37,7 +35,7 @@ class PdoDbalAdapterTest extends AdapterTestCase
$pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); $pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemInterface;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\NullAdapter; use Symfony\Component\Cache\Adapter\NullAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter; use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
@ -22,8 +21,6 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
*/ */
class PhpArrayAdapterTest extends AdapterTestCase class PhpArrayAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
protected $skippedTests = [ protected $skippedTests = [
'testGet' => 'PhpArrayAdapter is read-only.', 'testGet' => 'PhpArrayAdapter is read-only.',
'testRecursiveGet' => 'PhpArrayAdapter is read-only.', 'testRecursiveGet' => 'PhpArrayAdapter is read-only.',
@ -61,12 +58,12 @@ class PhpArrayAdapterTest extends AdapterTestCase
protected static $file; protected static $file;
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
} }
private function doTearDown() protected function tearDown()
{ {
if (file_exists(sys_get_temp_dir().'/symfony-cache')) { if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');

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\FilesystemAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter; use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
@ -20,8 +19,6 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
*/ */
class PhpArrayAdapterWithFallbackTest extends AdapterTestCase class PhpArrayAdapterWithFallbackTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
protected $skippedTests = [ protected $skippedTests = [
'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.',
'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.',
@ -33,12 +30,12 @@ class PhpArrayAdapterWithFallbackTest extends AdapterTestCase
protected static $file; protected static $file;
private static function doSetUpBeforeClass() public static function setUpBeforeClass()
{ {
self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php';
} }
private function doTearDown() protected function tearDown()
{ {
if (file_exists(sys_get_temp_dir().'/symfony-cache')) { if (file_exists(sys_get_temp_dir().'/symfony-cache')) {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');

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\PhpFilesAdapter; use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
/** /**
@ -20,8 +19,6 @@ use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
*/ */
class PhpFilesAdapterTest extends AdapterTestCase class PhpFilesAdapterTest extends AdapterTestCase
{ {
use ForwardCompatTestTrait;
protected $skippedTests = [ protected $skippedTests = [
'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.', 'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.',
]; ];
@ -31,7 +28,7 @@ class PhpFilesAdapterTest extends AdapterTestCase
return new PhpFilesAdapter('sf-cache'); return new PhpFilesAdapter('sf-cache');
} }
private static function doTearDownAfterClass() public static function tearDownAfterClass()
{ {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
} }

View File

@ -12,14 +12,11 @@
namespace Symfony\Component\Cache\Tests\Adapter; namespace Symfony\Component\Cache\Tests\Adapter;
use Predis\Connection\StreamConnection; use Predis\Connection\StreamConnection;
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Adapter\RedisAdapter;
class PredisAdapterTest extends AbstractRedisAdapterTest class PredisAdapterTest extends AbstractRedisAdapterTest
{ {
use ForwardCompatTestTrait; public static function setUpBeforeClass()
private static function doSetUpBeforeClass()
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]);

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