Merge branch '4.3' into 4.4
* 4.3: Remove use of ForwardCompatTrait Remove deprecated methods assertArraySubset
This commit is contained in:
commit
d588be203a
@ -19,6 +19,7 @@ env:
|
||||
global:
|
||||
- MIN_PHP=7.1.3
|
||||
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php
|
||||
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
|
||||
- MESSENGER_AMQP_DSN=amqp://localhost/%2f/messages
|
||||
- MESSENGER_REDIS_DSN=redis://127.0.0.1:7001/messages
|
||||
|
||||
|
@ -13,17 +13,14 @@ namespace Symfony\Bridge\Doctrine\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\ContainerAwareEventManager;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
|
||||
class ContainerAwareEventManagerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $container;
|
||||
private $evm;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = new Container();
|
||||
$this->evm = new ContainerAwareEventManager($this->container);
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\DependencyInjection\ServiceLocator;
|
||||
|
||||
class RegisterEventListenersAndSubscribersPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testExceptionOnAbstractTaggedSubscriber()
|
||||
{
|
||||
$this->expectException('InvalidArgumentException');
|
||||
|
@ -4,14 +4,11 @@ namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
class RegisterMappingsPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testNoDriverParmeterException()
|
||||
{
|
||||
$this->expectException('InvalidArgumentException');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
@ -22,14 +21,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
*/
|
||||
class DoctrineExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var \Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension
|
||||
*/
|
||||
private $extension;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -19,7 +19,6 @@ use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader;
|
||||
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
|
||||
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
|
||||
|
||||
@ -28,8 +27,6 @@ use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
|
||||
*/
|
||||
class DoctrineChoiceLoaderTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
@ -75,7 +72,7 @@ class DoctrineChoiceLoaderTest extends TestCase
|
||||
*/
|
||||
private $obj3;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock();
|
||||
$this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock();
|
||||
|
@ -14,21 +14,18 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\DataTransformer;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class CollectionToArrayTransformerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var CollectionToArrayTransformer
|
||||
*/
|
||||
private $transformer;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->transformer = new CollectionToArrayTransformer();
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\EventListener;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\Form\FormBuilder;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\Form\FormEvents;
|
||||
|
||||
class MergeDoctrineCollectionListenerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/** @var \Doctrine\Common\Collections\ArrayCollection */
|
||||
private $collection;
|
||||
/** @var \Symfony\Component\EventDispatcher\EventDispatcher */
|
||||
@ -31,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
|
||||
private $factory;
|
||||
private $form;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->collection = new ArrayCollection(['test']);
|
||||
$this->dispatcher = new EventDispatcher();
|
||||
@ -40,7 +37,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
|
||||
->getForm();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->collection = null;
|
||||
$this->dispatcher = null;
|
||||
|
@ -15,7 +15,6 @@ use Doctrine\ORM\Tools\SchemaTool;
|
||||
use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension;
|
||||
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
use Symfony\Component\Form\Test\FormPerformanceTestCase;
|
||||
|
||||
@ -24,8 +23,6 @@ use Symfony\Component\Form\Test\FormPerformanceTestCase;
|
||||
*/
|
||||
class EntityTypePerformanceTest extends FormPerformanceTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
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();
|
||||
|
||||
|
@ -28,7 +28,6 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringCastableIdEntity;
|
||||
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\ChoiceView;
|
||||
use Symfony\Component\Form\Forms;
|
||||
@ -37,8 +36,6 @@ use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest;
|
||||
|
||||
class EntityTypeTest extends BaseTypeTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType';
|
||||
|
||||
const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity';
|
||||
@ -62,7 +59,7 @@ class EntityTypeTest extends BaseTypeTest
|
||||
|
||||
protected static $supportedFeatureSetVersion = 304;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->em = DoctrineTestHelper::createTestEntityManager();
|
||||
$this->emRegistry = $this->createRegistryMock('default', $this->em);
|
||||
@ -92,7 +89,7 @@ class EntityTypeTest extends BaseTypeTest
|
||||
}
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
|
@ -13,14 +13,11 @@ namespace Symfony\Bridge\Doctrine\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\ManagerRegistry;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper\PhpDumperTest;
|
||||
|
||||
class ManagerRegistryTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!class_exists('PHPUnit_Framework_TestCase')) {
|
||||
self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.');
|
||||
|
@ -16,12 +16,9 @@ use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider;
|
||||
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\User;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
|
||||
class EntityUserProviderTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testRefreshUserGetsUserByPrimaryKey()
|
||||
{
|
||||
$em = DoctrineTestHelper::createTestEntityManager();
|
||||
|
@ -32,7 +32,6 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdStringWrapperNameEntity;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
||||
|
||||
/**
|
||||
@ -40,8 +39,6 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
||||
*/
|
||||
class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
const EM_NAME = 'foo';
|
||||
|
||||
/**
|
||||
@ -61,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
|
||||
|
||||
protected $repositoryFactory;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->repositoryFactory = new TestRepositoryFactory();
|
||||
|
||||
|
@ -13,13 +13,10 @@ namespace Symfony\Bridge\PhpUnit\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\DnsMock;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
|
||||
class DnsMockTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
DnsMock::withMockedHosts(array());
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace Symfony\Bridge\PhpUnit\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* Don't remove this test case, it tests the legacy group.
|
||||
@ -14,8 +13,6 @@ use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
*/
|
||||
class ProcessIsolationTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @expectedDeprecation Test abc
|
||||
*/
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Instantiator;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
@ -23,8 +22,6 @@ use Symfony\Component\DependencyInjection\Definition;
|
||||
*/
|
||||
class RuntimeInstantiatorTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var RuntimeInstantiator
|
||||
*/
|
||||
@ -33,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->instantiator = new RuntimeInstantiator();
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
|
||||
@ -24,8 +23,6 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
|
||||
*/
|
||||
class ProxyDumperTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var ProxyDumper
|
||||
*/
|
||||
@ -34,7 +31,7 @@ class ProxyDumperTest extends TestCase
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->dumper = new ProxyDumper();
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\AppVariable;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
|
||||
@ -11,14 +10,12 @@ use Symfony\Component\HttpFoundation\Session\Session;
|
||||
|
||||
class AppVariableTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var AppVariable
|
||||
*/
|
||||
protected $appVariable;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->appVariable = new AppVariable();
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Command\LintCommand;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@ -22,8 +21,6 @@ use Twig\Loader\FilesystemLoader;
|
||||
|
||||
class LintCommandTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $files;
|
||||
|
||||
public function testLintCorrectFile()
|
||||
@ -96,12 +93,12 @@ class LintCommandTest extends TestCase
|
||||
return $filename;
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->files = [];
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
foreach ($this->files as $file) {
|
||||
if (file_exists($file)) {
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -23,8 +22,6 @@ use Twig\Environment;
|
||||
|
||||
class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3HorizontalLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
use RuntimeLoaderProvider;
|
||||
|
||||
protected $testableFeatures = [
|
||||
@ -36,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori
|
||||
*/
|
||||
private $renderer;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -23,7 +22,6 @@ use Twig\Environment;
|
||||
|
||||
class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use RuntimeLoaderProvider;
|
||||
|
||||
/**
|
||||
@ -31,7 +29,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
|
||||
*/
|
||||
private $renderer;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -28,7 +27,6 @@ use Twig\Environment;
|
||||
*/
|
||||
class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4HorizontalLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use RuntimeLoaderProvider;
|
||||
|
||||
protected $testableFeatures = [
|
||||
@ -37,7 +35,7 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori
|
||||
|
||||
private $renderer;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -28,14 +27,13 @@ use Twig\Environment;
|
||||
*/
|
||||
class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use RuntimeLoaderProvider;
|
||||
/**
|
||||
* @var FormRenderer
|
||||
*/
|
||||
private $renderer;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -25,7 +24,6 @@ use Twig\Environment;
|
||||
|
||||
class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use RuntimeLoaderProvider;
|
||||
|
||||
/**
|
||||
@ -35,7 +33,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
|
||||
|
||||
protected static $supportedFeatureSetVersion = 404;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\FormExtension;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
|
||||
@ -24,7 +23,6 @@ use Twig\Environment;
|
||||
|
||||
class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use RuntimeLoaderProvider;
|
||||
|
||||
/**
|
||||
@ -34,7 +32,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
|
||||
|
||||
protected static $supportedFeatureSetVersion = 404;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\HttpKernelExtension;
|
||||
use Symfony\Bridge\Twig\Extension\HttpKernelRuntime;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -23,8 +22,6 @@ use Twig\Loader\ArrayLoader;
|
||||
|
||||
class HttpKernelExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testFragmentWithError()
|
||||
{
|
||||
$this->expectException('Twig\Error\RuntimeError');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\StopwatchExtension;
|
||||
use Twig\Environment;
|
||||
use Twig\Error\RuntimeError;
|
||||
@ -20,8 +19,6 @@ use Twig\Loader\ArrayLoader;
|
||||
|
||||
class StopwatchExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testFailIfStoppingWrongEvent()
|
||||
{
|
||||
$this->expectException('Twig\Error\SyntaxError');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Component\Translation\Loader\ArrayLoader;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
@ -21,8 +20,6 @@ use Twig\Loader\ArrayLoader as TwigArrayLoader;
|
||||
|
||||
class TranslationExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testEscaping()
|
||||
{
|
||||
$output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(['value' => 12, 'msg' => 'approx.']);
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use Fig\Link\Link;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\WebLinkExtension;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
@ -23,8 +22,6 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
*/
|
||||
class WebLinkExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var Request
|
||||
*/
|
||||
@ -35,7 +32,7 @@ class WebLinkExtensionTest extends TestCase
|
||||
*/
|
||||
private $extension;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->request = new Request();
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Extension;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\WorkflowExtension;
|
||||
use Symfony\Component\Workflow\Definition;
|
||||
use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
|
||||
@ -26,12 +25,10 @@ use Symfony\Component\Workflow\Workflow;
|
||||
|
||||
class WorkflowExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $extension;
|
||||
private $t1;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
if (!class_exists(Workflow::class)) {
|
||||
$this->markTestSkipped('The Workflow component is needed to run tests for this extension.');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests\Translation;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\Extension\TranslationExtension;
|
||||
use Symfony\Bridge\Twig\Translation\TwigExtractor;
|
||||
use Symfony\Component\Translation\MessageCatalogue;
|
||||
@ -23,8 +22,6 @@ use Twig\Loader\ArrayLoader;
|
||||
|
||||
class TwigExtractorTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @dataProvider getExtractData
|
||||
*/
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bridge\Twig\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bridge\Twig\TwigEngine;
|
||||
use Symfony\Component\Templating\TemplateReference;
|
||||
use Twig\Environment;
|
||||
@ -23,8 +22,6 @@ use Twig\Loader\ArrayLoader;
|
||||
*/
|
||||
class TwigEngineTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testExistsWithTemplateInstances()
|
||||
{
|
||||
$engine = $this->getTwig();
|
||||
|
@ -5,7 +5,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
||||
use Doctrine\Common\Annotations\AnnotationReader;
|
||||
use Doctrine\Common\Annotations\CachedReader;
|
||||
use Doctrine\Common\Annotations\Reader;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\Cache\Adapter\NullAdapter;
|
||||
@ -15,11 +14,9 @@ use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
class AnnotationsCacheWarmerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $cacheDir;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->cacheDir = sys_get_temp_dir().'/'.uniqid();
|
||||
$fs = new Filesystem();
|
||||
@ -27,7 +24,7 @@ class AnnotationsCacheWarmerTest extends TestCase
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$fs = new Filesystem();
|
||||
$fs->remove($this->cacheDir);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\Cache\Adapter\NullAdapter;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
|
||||
|
||||
class SerializerCacheWarmerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testWarmUp()
|
||||
{
|
||||
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
|
||||
@ -25,8 +24,6 @@ use Symfony\Component\Filesystem\Filesystem;
|
||||
*/
|
||||
class TemplatePathsCacheWarmerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/** @var Filesystem */
|
||||
private $filesystem;
|
||||
|
||||
@ -41,7 +38,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
|
||||
|
||||
private $tmpDir;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->templateFinder = $this
|
||||
->getMockBuilder(TemplateFinderInterface::class)
|
||||
@ -62,7 +59,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
|
||||
$this->filesystem->mkdir($this->tmpDir);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->filesystem->remove($this->tmpDir);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
||||
|
||||
use PHPUnit\Framework\Warning;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\Cache\Adapter\NullAdapter;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\Validator\ValidatorBuilder;
|
||||
|
||||
class ValidatorCacheWarmerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testWarmUp()
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 70400) {
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture\TestAppKernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -24,21 +23,19 @@ use Symfony\Component\Finder\Finder;
|
||||
|
||||
class CacheClearCommandTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/** @var TestAppKernel */
|
||||
private $kernel;
|
||||
/** @var Filesystem */
|
||||
private $fs;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->fs = new Filesystem();
|
||||
$this->kernel = new TestAppKernel('test', true);
|
||||
$this->fs->mkdir($this->kernel->getProjectDir());
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->fs->remove($this->kernel->getProjectDir());
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\HttpKernel;
|
||||
|
||||
class TranslationDebugCommandTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $fs;
|
||||
private $translationDir;
|
||||
|
||||
@ -130,7 +127,7 @@ class TranslationDebugCommandTest extends TestCase
|
||||
$tester->execute(['locale' => 'en', 'bundle' => 'dir']);
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->fs = new Filesystem();
|
||||
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
|
||||
@ -138,7 +135,7 @@ class TranslationDebugCommandTest extends TestCase
|
||||
$this->fs->mkdir($this->translationDir.'/templates');
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->fs->remove($this->translationDir);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\HttpKernel;
|
||||
|
||||
class TranslationUpdateCommandTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $fs;
|
||||
private $translationDir;
|
||||
|
||||
@ -108,7 +105,7 @@ class TranslationUpdateCommandTest extends TestCase
|
||||
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->fs = new Filesystem();
|
||||
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
|
||||
@ -116,7 +113,7 @@ class TranslationUpdateCommandTest extends TestCase
|
||||
$this->fs->mkdir($this->translationDir.'/templates');
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->fs->remove($this->translationDir);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Application as BaseApplication;
|
||||
@ -29,8 +28,6 @@ use Symfony\Component\HttpKernel\KernelInterface;
|
||||
*/
|
||||
class YamlLintCommandTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $files;
|
||||
|
||||
public function testLintCorrectFile()
|
||||
@ -184,13 +181,13 @@ EOF;
|
||||
return $application;
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
@mkdir(sys_get_temp_dir().'/yml-lint-test');
|
||||
$this->files = [];
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
foreach ($this->files as $file) {
|
||||
if (file_exists($file)) {
|
||||
|
@ -11,19 +11,16 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor;
|
||||
|
||||
class TextDescriptorTest extends AbstractDescriptorTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
putenv('COLUMNS=121');
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv('COLUMNS');
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
@ -22,11 +21,9 @@ use Symfony\Component\HttpKernel\Kernel;
|
||||
*/
|
||||
class ControllerNameParserTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $loader;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->loader = new ClassLoader();
|
||||
$this->loader->add('TestBundle', __DIR__.'/../Fixtures');
|
||||
@ -34,7 +31,7 @@ class ControllerNameParserTest extends TestCase
|
||||
$this->loader->register();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->loader->unregister();
|
||||
$this->loader = null;
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
|
||||
|
||||
use Fig\Link\Link;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
@ -33,8 +32,6 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
abstract class ControllerTraitTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
abstract protected function createController();
|
||||
|
||||
public function testForward()
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\TemplateController;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -21,8 +20,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
*/
|
||||
class TemplateControllerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testTwig()
|
||||
{
|
||||
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass;
|
||||
use Symfony\Component\Cache\Adapter\ArrayAdapter;
|
||||
use Symfony\Component\DependencyInjection\ChildDefinition;
|
||||
@ -25,11 +24,9 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
*/
|
||||
class CachePoolPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $cachePoolPass;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->cachePoolPass = new CachePoolPass();
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPrunerPass;
|
||||
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
|
||||
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
|
||||
@ -25,8 +24,6 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
*/
|
||||
class CachePoolPrunerPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testCompilerPassReplacesCommandArgument()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
@ -20,12 +19,10 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class DataCollectorTranslatorPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $container;
|
||||
private $dataCollectorTranslatorPass;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = new ContainerBuilder();
|
||||
$this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass();
|
||||
|
@ -12,14 +12,11 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
class ProfilerPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* Tests that collectors that specify a template but no "id" will throw
|
||||
* an exception (both are needed if the template is specified).
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
|
||||
@ -23,12 +22,10 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
class WorkflowGuardListenerPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $container;
|
||||
private $compilerPass;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = new ContainerBuilder();
|
||||
$this->compilerPass = new WorkflowGuardListenerPass();
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration;
|
||||
use Symfony\Bundle\FullStack;
|
||||
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
@ -25,8 +24,6 @@ use Symfony\Component\Messenger\MessageBusInterface;
|
||||
|
||||
class ConfigurationTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testDefaultConfig()
|
||||
{
|
||||
$processor = new Processor();
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
|
||||
|
||||
use Doctrine\Common\Annotations\Annotation;
|
||||
use Psr\Log\LoggerAwareInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -60,8 +59,6 @@ use Symfony\Component\Workflow;
|
||||
|
||||
abstract class FrameworkExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private static $containerCache = [];
|
||||
|
||||
abstract protected function loadFromFile(ContainerBuilder $container, $file);
|
||||
|
@ -11,15 +11,12 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
||||
|
||||
class PhpFrameworkExtensionTest extends FrameworkExtensionTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected function loadFromFile(ContainerBuilder $container, $file)
|
||||
{
|
||||
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/Fixtures/php'));
|
||||
|
@ -11,26 +11,23 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
abstract class AbstractWebTestCase extends BaseWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public static function assertRedirect($response, $location)
|
||||
{
|
||||
self::assertTrue($response->isRedirect(), 'Response is not a redirect, got status code: '.$response->getStatusCode());
|
||||
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
|
||||
}
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
static::deleteTmpDir();
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
static::deleteTmpDir();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
@ -21,9 +20,7 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
*/
|
||||
class CachePoolClearCommandTest extends AbstractWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']);
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\AdapterInterface;
|
||||
use Symfony\Component\Cache\Adapter\RedisAdapter;
|
||||
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
|
||||
@ -19,8 +18,6 @@ use Symfony\Component\Cache\Exception\InvalidArgumentException;
|
||||
|
||||
class CachePoolsTest extends AbstractWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testCachePools()
|
||||
{
|
||||
$this->doTestCachePools([], AdapterInterface::class);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
@ -22,11 +21,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
*/
|
||||
class ConfigDebugCommandTest extends AbstractWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $application;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']);
|
||||
$this->application = new Application($kernel);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
@ -22,11 +21,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
*/
|
||||
class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $application;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']);
|
||||
$this->application = new Application($kernel);
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Routing\Router;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
class RouterTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testConstructThrowsOnNonSymfonyNorPsr11Container()
|
||||
{
|
||||
$this->expectException('LogicException');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
@ -21,8 +20,6 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class DelegatingEngineTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testSupportsRetrievesEngineFromTheContainer()
|
||||
{
|
||||
$container = $this->getContainerMock([
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
@ -21,12 +20,10 @@ use Symfony\Component\DependencyInjection\Container;
|
||||
*/
|
||||
class GlobalVariablesTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $container;
|
||||
private $globals;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = new Container();
|
||||
$this->globals = new GlobalVariables($this->container);
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;
|
||||
use Symfony\Component\Asset\Package;
|
||||
use Symfony\Component\Asset\Packages;
|
||||
@ -23,11 +22,9 @@ use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
|
||||
*/
|
||||
class AssetsHelperTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $helper;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s'));
|
||||
$barPackage = new Package(new StaticVersionStrategy('22', '%s?%s'));
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
|
||||
@ -26,8 +25,6 @@ use Symfony\Component\Templating\PhpEngine;
|
||||
*/
|
||||
class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var PhpEngine
|
||||
*/
|
||||
@ -58,7 +55,7 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
||||
]);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->engine = null;
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTemplateNameParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures\StubTranslator;
|
||||
@ -26,8 +25,6 @@ use Symfony\Component\Templating\PhpEngine;
|
||||
*/
|
||||
class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var PhpEngine
|
||||
*/
|
||||
@ -103,7 +100,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
||||
]);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->engine = null;
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
@ -22,11 +21,9 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
*/
|
||||
class RequestHelperTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $requestStack;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->requestStack = new RequestStack();
|
||||
$request = new Request();
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
@ -24,11 +23,9 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
*/
|
||||
class SessionHelperTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $requestStack;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$request = new Request();
|
||||
|
||||
@ -42,7 +39,7 @@ class SessionHelperTest extends TestCase
|
||||
$this->requestStack->push($request);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->requestStack = null;
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Loader;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -21,8 +20,6 @@ use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
*/
|
||||
class TemplateLocatorTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testLocateATemplate()
|
||||
{
|
||||
$template = new TemplateReference('bundle', 'controller', 'name', 'format', 'engine');
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\PhpEngine;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -27,8 +26,6 @@ use Symfony\Component\Templating\TemplateNameParser;
|
||||
*/
|
||||
class PhpEngineTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testEvaluateAddsAppGlobal()
|
||||
{
|
||||
$container = $this->getContainer();
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateFilenameParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -21,16 +20,14 @@ use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
*/
|
||||
class TemplateFilenameParserTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $parser;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = new TemplateFilenameParser();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->parser = null;
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser;
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||
@ -22,11 +21,9 @@ use Symfony\Component\Templating\TemplateReference as BaseTemplateReference;
|
||||
*/
|
||||
class TemplateNameParserTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $parser;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock();
|
||||
$kernel
|
||||
@ -43,7 +40,7 @@ class TemplateNameParserTest extends TestCase
|
||||
$this->parser = new TemplateNameParser($kernel);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->parser = null;
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
|
||||
use Symfony\Component\Config\Resource\DirectoryResource;
|
||||
use Symfony\Component\Config\Resource\FileExistenceResource;
|
||||
@ -23,17 +22,15 @@ use Symfony\Component\Translation\MessageCatalogue;
|
||||
|
||||
class TranslatorTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $tmpDir;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->tmpDir = sys_get_temp_dir().'/sf_translation';
|
||||
$this->deleteTmpDir();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->deleteTmpDir();
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
@ -23,8 +22,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
||||
|
||||
class AddSecurityVotersPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testNoVoters()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\LogicException');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
|
||||
use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
||||
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
|
||||
@ -24,8 +23,6 @@ use Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder;
|
||||
|
||||
abstract class CompleteConfigurationTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
abstract protected function getLoader(ContainerBuilder $container);
|
||||
|
||||
abstract protected function getFileExtension();
|
||||
|
@ -12,14 +12,11 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration;
|
||||
use Symfony\Component\Config\Definition\Processor;
|
||||
|
||||
class MainConfigurationTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* The minimal, required config needed to not have any required validation
|
||||
* issues.
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory;
|
||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
|
||||
@ -21,8 +20,6 @@ use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
class GuardAuthenticationFactoryTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @dataProvider getValidConfigurationTests
|
||||
*/
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
|
||||
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
|
||||
use Symfony\Bundle\SecurityBundle\SecurityBundle;
|
||||
@ -25,8 +24,6 @@ use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
|
||||
class SecurityExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testInvalidCheckPath()
|
||||
{
|
||||
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
|
||||
|
@ -11,26 +11,23 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
abstract class AbstractWebTestCase extends BaseWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public static function assertRedirect($response, $location)
|
||||
{
|
||||
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'));
|
||||
}
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
static::deleteTmpDir();
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
static::deleteTmpDir();
|
||||
}
|
||||
|
@ -70,6 +70,6 @@ class JsonLoginTest extends AbstractWebTestCase
|
||||
|
||||
$this->assertSame(400, $response->getStatusCode());
|
||||
$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));
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand;
|
||||
use Symfony\Component\Console\Application as ConsoleApplication;
|
||||
@ -30,8 +29,6 @@ use Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder;
|
||||
*/
|
||||
class UserPasswordEncoderCommandTest extends AbstractWebTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/** @var CommandTester */
|
||||
private $passwordEncoderCommandTester;
|
||||
|
||||
@ -289,7 +286,7 @@ EOTXT
|
||||
], ['interactive' => false]);
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
putenv('COLUMNS='.(119 + \strlen(PHP_EOL)));
|
||||
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
|
||||
@ -302,7 +299,7 @@ EOTXT
|
||||
$this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand);
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->passwordEncoderCommandTester = null;
|
||||
}
|
||||
|
@ -12,15 +12,12 @@
|
||||
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
class TwigLoaderPassTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var ContainerBuilder
|
||||
*/
|
||||
@ -34,7 +31,7 @@ class TwigLoaderPassTest extends TestCase
|
||||
*/
|
||||
private $pass;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->builder = new ContainerBuilder();
|
||||
$this->builder->register('twig');
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
@ -24,8 +23,6 @@ use Symfony\Component\HttpKernel\Kernel;
|
||||
*/
|
||||
class CacheWarmingTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
|
||||
{
|
||||
$kernel = new CacheWarmingKernel(true);
|
||||
@ -50,12 +47,12 @@ class CacheWarmingTest extends TestCase
|
||||
$this->assertFileExists($kernel->getCacheDir().'/twig');
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->deleteTempDir();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->deleteTempDir();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
@ -21,8 +20,6 @@ use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class NoTemplatingEntryTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function test()
|
||||
{
|
||||
$kernel = new NoTemplatingEntryKernel('dev', true);
|
||||
@ -33,12 +30,12 @@ class NoTemplatingEntryTest extends TestCase
|
||||
$this->assertContains('{ a: b }', $content);
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->deleteTempDir();
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
$this->deleteTempDir();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle\Tests\Loader;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
|
||||
use Symfony\Bundle\TwigBundle\Tests\TestCase;
|
||||
use Symfony\Component\Templating\TemplateReferenceInterface;
|
||||
@ -21,8 +20,6 @@ use Symfony\Component\Templating\TemplateReferenceInterface;
|
||||
*/
|
||||
class FilesystemLoaderTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testGetSourceContext()
|
||||
{
|
||||
$parser = $this->getMockBuilder('Symfony\Component\Templating\TemplateNameParserInterface')->getMock();
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\WebProfilerBundle\DependencyInjection\WebProfilerExtension;
|
||||
use Symfony\Bundle\WebProfilerBundle\Tests\TestCase;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
@ -24,8 +23,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
class WebProfilerExtensionTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private $kernel;
|
||||
/**
|
||||
* @var \Symfony\Component\DependencyInjection\Container
|
||||
@ -50,7 +47,7 @@ class WebProfilerExtensionTest extends TestCase
|
||||
self::assertEquals([], $errors, $message);
|
||||
}
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -78,7 +75,7 @@ class WebProfilerExtensionTest extends TestCase
|
||||
$this->container->addCompilerPass(new RegisterListenersPass());
|
||||
}
|
||||
|
||||
private function doTearDown()
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Bundle\WebProfilerBundle\Tests\Profiler;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
|
||||
use Symfony\Bundle\WebProfilerBundle\Tests\TestCase;
|
||||
use Symfony\Component\HttpKernel\Profiler\Profile;
|
||||
@ -24,8 +23,6 @@ use Twig\Environment;
|
||||
*/
|
||||
class TemplateManagerTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @var Environment
|
||||
*/
|
||||
@ -41,7 +38,7 @@ class TemplateManagerTest extends TestCase
|
||||
*/
|
||||
protected $templateManager;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -12,15 +12,12 @@
|
||||
namespace Symfony\Component\Asset\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Asset\Package;
|
||||
use Symfony\Component\Asset\Packages;
|
||||
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
|
||||
|
||||
class PackagesTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testGetterSetters()
|
||||
{
|
||||
$packages = new Packages();
|
||||
|
@ -12,15 +12,12 @@
|
||||
namespace Symfony\Component\Asset\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Asset\UrlPackage;
|
||||
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
|
||||
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
|
||||
|
||||
class UrlPackageTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
/**
|
||||
* @dataProvider getConfigs
|
||||
*/
|
||||
|
@ -12,13 +12,10 @@
|
||||
namespace Symfony\Component\Asset\Tests\VersionStrategy;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy;
|
||||
|
||||
class JsonManifestVersionStrategyTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testGetVersion()
|
||||
{
|
||||
$strategy = $this->createStrategy('manifest-valid.json');
|
||||
|
@ -12,13 +12,10 @@
|
||||
namespace Symfony\Component\BrowserKit\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\BrowserKit\Cookie;
|
||||
|
||||
class CookieTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testToString()
|
||||
{
|
||||
$cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true);
|
||||
|
@ -11,13 +11,10 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\RedisAdapter;
|
||||
|
||||
abstract class AbstractRedisAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $skippedTests = [
|
||||
'testExpiration' => '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);
|
||||
}
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!\extension_loaded('redis')) {
|
||||
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;
|
||||
}
|
||||
|
@ -15,16 +15,13 @@ use Cache\IntegrationTests\CachePoolTest;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use Psr\Cache\CacheItemInterface;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\CacheItem;
|
||||
use Symfony\Component\Cache\PruneableInterface;
|
||||
use Symfony\Contracts\Cache\CallbackInterface;
|
||||
|
||||
abstract class AdapterTestCase extends CachePoolTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private function doSetUp()
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\AdapterInterface;
|
||||
use Symfony\Component\Cache\Adapter\ArrayAdapter;
|
||||
use Symfony\Component\Cache\Adapter\ChainAdapter;
|
||||
@ -25,8 +24,6 @@ use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
|
||||
*/
|
||||
class ChainAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function createCachePool($defaultLifetime = 0, $testMethod = null)
|
||||
{
|
||||
if ('testGetMetadata' === $testMethod) {
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
|
||||
|
||||
/**
|
||||
@ -20,14 +19,12 @@ use Symfony\Component\Cache\Adapter\FilesystemAdapter;
|
||||
*/
|
||||
class FilesystemAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function createCachePool($defaultLifetime = 0)
|
||||
{
|
||||
return new FilesystemAdapter('', $defaultLifetime);
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
self::rmdir(sys_get_temp_dir().'/symfony-cache');
|
||||
}
|
||||
|
@ -12,13 +12,10 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\AbstractAdapter;
|
||||
|
||||
class MaxIdLengthAdapterTest extends TestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
public function testLongKey()
|
||||
{
|
||||
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
|
||||
|
@ -11,14 +11,11 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\AbstractAdapter;
|
||||
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
|
||||
|
||||
class MemcachedAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $skippedTests = [
|
||||
'testHasItemReturnsFalseWhenDeferredItemIsExpired' => '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;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!MemcachedAdapter::isSupported()) {
|
||||
self::markTestSkipped('Extension memcached >=2.2.0 required.');
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
|
||||
@ -20,12 +19,11 @@ use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
*/
|
||||
class PdoAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use PdoPruneableTrait;
|
||||
|
||||
protected static $dbFile;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!\extension_loaded('pdo_sqlite')) {
|
||||
self::markTestSkipped('Extension pdo_sqlite required.');
|
||||
@ -37,7 +35,7 @@ class PdoAdapterTest extends AdapterTestCase
|
||||
$pool->createTable();
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
@unlink(self::$dbFile);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Doctrine\DBAL\DriverManager;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
|
||||
@ -21,12 +20,11 @@ use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
*/
|
||||
class PdoDbalAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
use PdoPruneableTrait;
|
||||
|
||||
protected static $dbFile;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
if (!\extension_loaded('pdo_sqlite')) {
|
||||
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]));
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
@unlink(self::$dbFile);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Psr\Cache\CacheItemInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
|
||||
use Symfony\Component\Cache\Adapter\NullAdapter;
|
||||
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
|
||||
@ -22,8 +21,6 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
|
||||
*/
|
||||
class PhpArrayAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $skippedTests = [
|
||||
'testGet' => 'PhpArrayAdapter is read-only.',
|
||||
'testRecursiveGet' => 'PhpArrayAdapter is read-only.',
|
||||
@ -61,12 +58,12 @@ class PhpArrayAdapterTest extends AdapterTestCase
|
||||
|
||||
protected static $file;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
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')) {
|
||||
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
|
||||
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
|
||||
|
||||
@ -20,8 +19,6 @@ use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
|
||||
*/
|
||||
class PhpArrayAdapterWithFallbackTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $skippedTests = [
|
||||
'testGetItemInvalidKeys' => '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;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
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')) {
|
||||
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
|
||||
|
||||
/**
|
||||
@ -20,8 +19,6 @@ use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
|
||||
*/
|
||||
class PhpFilesAdapterTest extends AdapterTestCase
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
protected $skippedTests = [
|
||||
'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.',
|
||||
];
|
||||
@ -31,7 +28,7 @@ class PhpFilesAdapterTest extends AdapterTestCase
|
||||
return new PhpFilesAdapter('sf-cache');
|
||||
}
|
||||
|
||||
private static function doTearDownAfterClass()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
|
||||
}
|
||||
|
@ -12,14 +12,11 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Predis\Connection\StreamConnection;
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Cache\Adapter\RedisAdapter;
|
||||
|
||||
class PredisAdapterTest extends AbstractRedisAdapterTest
|
||||
{
|
||||
use ForwardCompatTestTrait;
|
||||
|
||||
private static function doSetUpBeforeClass()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
parent::setupBeforeClass();
|
||||
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
Reference in New Issue
Block a user