Disable phpunit typehint patch on 4.3 branch

This commit is contained in:
Jérémy Derussé 2019-08-08 11:17:10 +02:00
parent fda49e699a
commit a5af6c4cd7
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2
346 changed files with 498 additions and 499 deletions

View File

@ -19,7 +19,6 @@ 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

@ -20,7 +20,7 @@ class ContainerAwareEventManagerTest extends TestCase
private $container; private $container;
private $evm; private $evm;
protected function setUp() protected function setUp(): void
{ {
$this->container = new Container(); $this->container = new Container();
$this->evm = new ContainerAwareEventManager($this->container); $this->evm = new ContainerAwareEventManager($this->container);

View File

@ -26,7 +26,7 @@ class DoctrineExtensionTest extends TestCase
*/ */
private $extension; private $extension;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -73,7 +73,7 @@ class DoctrineChoiceLoaderTest extends TestCase
*/ */
private $obj3; private $obj3;
protected function setUp() protected function setUp(): void
{ {
$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

@ -25,7 +25,7 @@ class CollectionToArrayTransformerTest extends TestCase
*/ */
private $transformer; private $transformer;
protected function setUp() protected function setUp(): void
{ {
$this->transformer = new CollectionToArrayTransformer(); $this->transformer = new CollectionToArrayTransformer();
} }

View File

@ -28,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
private $factory; private $factory;
private $form; private $form;
protected function setUp() protected function setUp(): void
{ {
$this->collection = new ArrayCollection(['test']); $this->collection = new ArrayCollection(['test']);
$this->dispatcher = new EventDispatcher(); $this->dispatcher = new EventDispatcher();
@ -37,7 +37,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
->getForm(); ->getForm();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->collection = null; $this->collection = null;
$this->dispatcher = null; $this->dispatcher = null;

View File

@ -50,7 +50,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
]; ];
} }
protected function setUp() protected function setUp(): void
{ {
$this->em = DoctrineTestHelper::createTestEntityManager(); $this->em = DoctrineTestHelper::createTestEntityManager();

View File

@ -60,7 +60,7 @@ class EntityTypeTest extends BaseTypeTest
protected static $supportedFeatureSetVersion = 304; protected static $supportedFeatureSetVersion = 304;
protected function setUp() protected function setUp(): void
{ {
$this->em = DoctrineTestHelper::createTestEntityManager(); $this->em = DoctrineTestHelper::createTestEntityManager();
$this->emRegistry = $this->createRegistryMock('default', $this->em); $this->emRegistry = $this->createRegistryMock('default', $this->em);
@ -90,7 +90,7 @@ class EntityTypeTest extends BaseTypeTest
} }
} }
protected function tearDown() protected function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();

View File

@ -17,7 +17,7 @@ use Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper\PhpDumperTest;
class ManagerRegistryTest extends TestCase class ManagerRegistryTest extends TestCase
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
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

@ -58,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
protected $repositoryFactory; protected $repositoryFactory;
protected function setUp() protected function setUp(): void
{ {
$this->repositoryFactory = new TestRepositoryFactory(); $this->repositoryFactory = new TestRepositoryFactory();

View File

@ -21,12 +21,12 @@ use Symfony\Bridge\PhpUnit\ClockMock;
*/ */
class ClockMockTest extends TestCase class ClockMockTest extends TestCase
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
ClockMock::register(__CLASS__); ClockMock::register(__CLASS__);
} }
protected function setUp() protected function setUp(): void
{ {
ClockMock::withClockMock(1234567890.125); ClockMock::withClockMock(1234567890.125);
} }

View File

@ -16,7 +16,7 @@ use Symfony\Bridge\PhpUnit\DnsMock;
class DnsMockTest extends TestCase class DnsMockTest extends TestCase
{ {
protected function tearDown() protected function tearDown(): void
{ {
DnsMock::withMockedHosts(array()); DnsMock::withMockedHosts(array());
} }

View File

@ -30,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() protected function setUp(): void
{ {
$this->instantiator = new RuntimeInstantiator(); $this->instantiator = new RuntimeInstantiator();
} }

View File

@ -32,7 +32,7 @@ class ProxyDumperTest extends TestCase
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() protected function setUp(): void
{ {
$this->dumper = new ProxyDumper(); $this->dumper = new ProxyDumper();
} }

View File

@ -15,7 +15,7 @@ class AppVariableTest extends TestCase
*/ */
protected $appVariable; protected $appVariable;
protected function setUp() protected function setUp(): void
{ {
$this->appVariable = new AppVariable(); $this->appVariable = new AppVariable();
} }

View File

@ -93,12 +93,12 @@ class LintCommandTest extends TestCase
return $filename; return $filename;
} }
protected function setUp() protected function setUp(): void
{ {
$this->files = []; $this->files = [];
} }
protected function tearDown() protected function tearDown(): void
{ {
foreach ($this->files as $file) { foreach ($this->files as $file) {
if (file_exists($file)) { if (file_exists($file)) {

View File

@ -33,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori
*/ */
private $renderer; private $renderer;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -29,7 +29,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
*/ */
private $renderer; private $renderer;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -35,7 +35,7 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori
private $renderer; private $renderer;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -33,7 +33,7 @@ class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest
*/ */
private $renderer; private $renderer;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -33,7 +33,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
protected static $supportedFeatureSetVersion = 403; protected static $supportedFeatureSetVersion = 403;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -32,7 +32,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
protected static $supportedFeatureSetVersion = 403; protected static $supportedFeatureSetVersion = 403;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -32,7 +32,7 @@ class WebLinkExtensionTest extends TestCase
*/ */
private $extension; private $extension;
protected function setUp() protected function setUp(): void
{ {
$this->request = new Request(); $this->request = new Request();

View File

@ -28,7 +28,7 @@ class WorkflowExtensionTest extends TestCase
private $extension; private $extension;
private $t1; private $t1;
protected function setUp() protected function setUp(): void
{ {
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

@ -17,7 +17,7 @@ class AnnotationsCacheWarmerTest extends TestCase
{ {
private $cacheDir; private $cacheDir;
protected function setUp() protected function setUp(): void
{ {
$this->cacheDir = sys_get_temp_dir().'/'.uniqid(); $this->cacheDir = sys_get_temp_dir().'/'.uniqid();
$fs = new Filesystem(); $fs = new Filesystem();
@ -25,7 +25,7 @@ class AnnotationsCacheWarmerTest extends TestCase
parent::setUp(); parent::setUp();
} }
protected function tearDown() protected function tearDown(): void
{ {
$fs = new Filesystem(); $fs = new Filesystem();
$fs->remove($this->cacheDir); $fs->remove($this->cacheDir);

View File

@ -38,7 +38,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
private $tmpDir; private $tmpDir;
protected function setUp() protected function setUp(): void
{ {
$this->templateFinder = $this $this->templateFinder = $this
->getMockBuilder(TemplateFinderInterface::class) ->getMockBuilder(TemplateFinderInterface::class)
@ -59,7 +59,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
$this->filesystem->mkdir($this->tmpDir); $this->filesystem->mkdir($this->tmpDir);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->filesystem->remove($this->tmpDir); $this->filesystem->remove($this->tmpDir);
} }

View File

@ -28,14 +28,14 @@ class CacheClearCommandTest extends TestCase
/** @var Filesystem */ /** @var Filesystem */
private $fs; private $fs;
protected function setUp() protected function setUp(): void
{ {
$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());
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->fs->remove($this->kernel->getProjectDir()); $this->fs->remove($this->kernel->getProjectDir());
} }

View File

@ -127,7 +127,7 @@ class TranslationDebugCommandTest extends TestCase
$tester->execute(['locale' => 'en', 'bundle' => 'dir']); $tester->execute(['locale' => 'en', 'bundle' => 'dir']);
} }
protected function setUp() protected function setUp(): void
{ {
$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);
@ -135,7 +135,7 @@ class TranslationDebugCommandTest extends TestCase
$this->fs->mkdir($this->translationDir.'/templates'); $this->fs->mkdir($this->translationDir.'/templates');
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->fs->remove($this->translationDir); $this->fs->remove($this->translationDir);
} }

View File

@ -105,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());
} }
protected function setUp() protected function setUp(): void
{ {
$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);
@ -113,7 +113,7 @@ class TranslationUpdateCommandTest extends TestCase
$this->fs->mkdir($this->translationDir.'/templates'); $this->fs->mkdir($this->translationDir.'/templates');
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->fs->remove($this->translationDir); $this->fs->remove($this->translationDir);
} }

View File

@ -181,13 +181,13 @@ EOF;
return $application; return $application;
} }
protected function setUp() protected function setUp(): void
{ {
@mkdir(sys_get_temp_dir().'/yml-lint-test'); @mkdir(sys_get_temp_dir().'/yml-lint-test');
$this->files = []; $this->files = [];
} }
protected function tearDown() protected function tearDown(): void
{ {
foreach ($this->files as $file) { foreach ($this->files as $file) {
if (file_exists($file)) { if (file_exists($file)) {

View File

@ -15,12 +15,12 @@ use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor;
class TextDescriptorTest extends AbstractDescriptorTest class TextDescriptorTest extends AbstractDescriptorTest
{ {
protected function setUp() protected function setUp(): void
{ {
putenv('COLUMNS=121'); putenv('COLUMNS=121');
} }
protected function tearDown() protected function tearDown(): void
{ {
putenv('COLUMNS'); putenv('COLUMNS');
} }

View File

@ -23,7 +23,7 @@ class ControllerNameParserTest extends TestCase
{ {
protected $loader; protected $loader;
protected function setUp() protected function setUp(): void
{ {
$this->loader = new ClassLoader(); $this->loader = new ClassLoader();
$this->loader->add('TestBundle', __DIR__.'/../Fixtures'); $this->loader->add('TestBundle', __DIR__.'/../Fixtures');
@ -31,7 +31,7 @@ class ControllerNameParserTest extends TestCase
$this->loader->register(); $this->loader->register();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->loader->unregister(); $this->loader->unregister();
$this->loader = null; $this->loader = null;

View File

@ -26,7 +26,7 @@ class CachePoolPassTest extends TestCase
{ {
private $cachePoolPass; private $cachePoolPass;
protected function setUp() protected function setUp(): void
{ {
$this->cachePoolPass = new CachePoolPass(); $this->cachePoolPass = new CachePoolPass();
} }

View File

@ -22,7 +22,7 @@ class DataCollectorTranslatorPassTest extends TestCase
private $container; private $container;
private $dataCollectorTranslatorPass; private $dataCollectorTranslatorPass;
protected function setUp() protected function setUp(): void
{ {
$this->container = new ContainerBuilder(); $this->container = new ContainerBuilder();
$this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass(); $this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass();

View File

@ -25,7 +25,7 @@ class WorkflowGuardListenerPassTest extends TestCase
private $container; private $container;
private $compilerPass; private $compilerPass;
protected function setUp() protected function setUp(): void
{ {
$this->container = new ContainerBuilder(); $this->container = new ContainerBuilder();
$this->compilerPass = new WorkflowGuardListenerPass(); $this->compilerPass = new WorkflowGuardListenerPass();

View File

@ -22,12 +22,12 @@ abstract class AbstractWebTestCase extends BaseWebTestCase
self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
} }
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }

View File

@ -20,7 +20,7 @@ use Symfony\Component\Console\Tester\CommandTester;
*/ */
class CachePoolClearCommandTest extends AbstractWebTestCase class CachePoolClearCommandTest extends AbstractWebTestCase
{ {
protected function setUp() protected function setUp(): void
{ {
static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']); static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']);
} }

View File

@ -23,7 +23,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
{ {
private $application; private $application;
protected function setUp() protected function setUp(): void
{ {
$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

@ -23,7 +23,7 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
{ {
private $application; private $application;
protected function setUp() protected function setUp(): void
{ {
$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

@ -23,7 +23,7 @@ class GlobalVariablesTest extends TestCase
private $container; private $container;
private $globals; private $globals;
protected function setUp() protected function setUp(): void
{ {
$this->container = new Container(); $this->container = new Container();
$this->globals = new GlobalVariables($this->container); $this->globals = new GlobalVariables($this->container);

View File

@ -24,7 +24,7 @@ class AssetsHelperTest extends TestCase
{ {
private $helper; private $helper;
protected function setUp() protected function setUp(): void
{ {
$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

@ -55,7 +55,7 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
]); ]);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->engine = null; $this->engine = null;

View File

@ -100,7 +100,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
]); ]);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->engine = null; $this->engine = null;

View File

@ -23,7 +23,7 @@ class RequestHelperTest extends TestCase
{ {
protected $requestStack; protected $requestStack;
protected function setUp() protected function setUp(): void
{ {
$this->requestStack = new RequestStack(); $this->requestStack = new RequestStack();
$request = new Request(); $request = new Request();

View File

@ -25,7 +25,7 @@ class SessionHelperTest extends TestCase
{ {
protected $requestStack; protected $requestStack;
protected function setUp() protected function setUp(): void
{ {
$request = new Request(); $request = new Request();
@ -39,7 +39,7 @@ class SessionHelperTest extends TestCase
$this->requestStack->push($request); $this->requestStack->push($request);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->requestStack = null; $this->requestStack = null;
} }

View File

@ -22,12 +22,12 @@ class TemplateFilenameParserTest extends TestCase
{ {
protected $parser; protected $parser;
protected function setUp() protected function setUp(): void
{ {
$this->parser = new TemplateFilenameParser(); $this->parser = new TemplateFilenameParser();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->parser = null; $this->parser = null;
} }

View File

@ -23,7 +23,7 @@ class TemplateNameParserTest extends TestCase
{ {
protected $parser; protected $parser;
protected function setUp() protected function setUp(): void
{ {
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock();
$kernel $kernel
@ -40,7 +40,7 @@ class TemplateNameParserTest extends TestCase
$this->parser = new TemplateNameParser($kernel); $this->parser = new TemplateNameParser($kernel);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->parser = null; $this->parser = null;
} }

View File

@ -24,13 +24,13 @@ class TranslatorTest extends TestCase
{ {
protected $tmpDir; protected $tmpDir;
protected function setUp() protected function setUp(): void
{ {
$this->tmpDir = sys_get_temp_dir().'/sf_translation'; $this->tmpDir = sys_get_temp_dir().'/sf_translation';
$this->deleteTmpDir(); $this->deleteTmpDir();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->deleteTmpDir(); $this->deleteTmpDir();
} }

View File

@ -22,12 +22,12 @@ abstract class AbstractWebTestCase extends BaseWebTestCase
self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
} }
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
static::deleteTmpDir(); static::deleteTmpDir();
} }

View File

@ -286,7 +286,7 @@ EOTXT
], ['interactive' => false]); ], ['interactive' => false]);
} }
protected function setUp() protected function setUp(): void
{ {
putenv('COLUMNS='.(119 + \strlen(PHP_EOL))); putenv('COLUMNS='.(119 + \strlen(PHP_EOL)));
$kernel = $this->createKernel(['test_case' => 'PasswordEncode']); $kernel = $this->createKernel(['test_case' => 'PasswordEncode']);
@ -299,7 +299,7 @@ EOTXT
$this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand); $this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->passwordEncoderCommandTester = null; $this->passwordEncoderCommandTester = null;
} }

View File

@ -31,7 +31,7 @@ class TwigLoaderPassTest extends TestCase
*/ */
private $pass; private $pass;
protected function setUp() protected function setUp(): void
{ {
$this->builder = new ContainerBuilder(); $this->builder = new ContainerBuilder();
$this->builder->register('twig'); $this->builder->register('twig');

View File

@ -47,12 +47,12 @@ class CacheWarmingTest extends TestCase
$this->assertFileExists($kernel->getCacheDir().'/twig'); $this->assertFileExists($kernel->getCacheDir().'/twig');
} }
protected function setUp() protected function setUp(): void
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }

View File

@ -30,12 +30,12 @@ class NoTemplatingEntryTest extends TestCase
$this->assertStringContainsString('{ a: b }', $content); $this->assertStringContainsString('{ a: b }', $content);
} }
protected function setUp() protected function setUp(): void
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->deleteTempDir(); $this->deleteTempDir();
} }

View File

@ -46,7 +46,7 @@ class WebProfilerExtensionTest extends TestCase
self::assertEquals([], $errors, $message); self::assertEquals([], $errors, $message);
} }
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
@ -73,7 +73,7 @@ class WebProfilerExtensionTest extends TestCase
$this->container->addCompilerPass(new RegisterListenersPass()); $this->container->addCompilerPass(new RegisterListenersPass());
} }
protected function tearDown() protected function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();

View File

@ -38,7 +38,7 @@ class TemplateManagerTest extends TestCase
*/ */
protected $templateManager; protected $templateManager;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -28,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);
} }
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('redis')) { if (!\extension_loaded('redis')) {
self::markTestSkipped('Extension redis required.'); self::markTestSkipped('Extension redis required.');
@ -39,7 +39,7 @@ abstract class AbstractRedisAdapterTest extends AdapterTestCase
} }
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
self::$redis = null; self::$redis = null;
} }

View File

@ -21,7 +21,7 @@ use Symfony\Contracts\Cache\CallbackInterface;
abstract class AdapterTestCase extends CachePoolTest abstract class AdapterTestCase extends CachePoolTest
{ {
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -24,7 +24,7 @@ class FilesystemAdapterTest extends AdapterTestCase
return new FilesystemAdapter('', $defaultLifetime); return new FilesystemAdapter('', $defaultLifetime);
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
self::rmdir(sys_get_temp_dir().'/symfony-cache'); self::rmdir(sys_get_temp_dir().'/symfony-cache');
} }

View File

@ -23,7 +23,7 @@ class MemcachedAdapterTest extends AdapterTestCase
protected static $client; protected static $client;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!MemcachedAdapter::isSupported()) { if (!MemcachedAdapter::isSupported()) {
self::markTestSkipped('Extension memcached >=2.2.0 required.'); self::markTestSkipped('Extension memcached >=2.2.0 required.');

View File

@ -23,7 +23,7 @@ class PdoAdapterTest extends AdapterTestCase
protected static $dbFile; protected static $dbFile;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -35,7 +35,7 @@ class PdoAdapterTest extends AdapterTestCase
$pool->createTable(); $pool->createTable();
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -24,7 +24,7 @@ class PdoDbalAdapterTest extends AdapterTestCase
protected static $dbFile; protected static $dbFile;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -35,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]));
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -58,12 +58,12 @@ class PhpArrayAdapterTest extends AdapterTestCase
protected static $file; protected static $file;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
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';
} }
protected function tearDown() protected function tearDown(): void
{ {
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

@ -30,12 +30,12 @@ class PhpArrayAdapterWithFallbackTest extends AdapterTestCase
protected static $file; protected static $file;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
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';
} }
protected function tearDown() protected function tearDown(): void
{ {
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

@ -28,7 +28,7 @@ class PhpFilesAdapterTest extends AdapterTestCase
return new PhpFilesAdapter('sf-cache'); return new PhpFilesAdapter('sf-cache');
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
} }

View File

@ -16,7 +16,7 @@ use Symfony\Component\Cache\Adapter\RedisAdapter;
class PredisAdapterTest extends AbstractRedisAdapterTest class PredisAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]);

View File

@ -13,13 +13,13 @@ namespace Symfony\Component\Cache\Tests\Adapter;
class PredisClusterAdapterTest extends AbstractRedisAdapterTest class PredisClusterAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]); self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]);
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
self::$redis = null; self::$redis = null;
} }

View File

@ -15,7 +15,7 @@ use Symfony\Component\Cache\Adapter\RedisAdapter;
class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
@ -24,7 +24,7 @@ class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest
self::$redis = RedisAdapter::createConnection('redis:?host['.str_replace(' ', ']&host[', $hosts).']', ['class' => \Predis\Client::class, 'redis_cluster' => true]); self::$redis = RedisAdapter::createConnection('redis:?host['.str_replace(' ', ']&host[', $hosts).']', ['class' => \Predis\Client::class, 'redis_cluster' => true]);
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
self::$redis = null; self::$redis = null;
} }

View File

@ -17,7 +17,7 @@ use Symfony\Component\Cache\Traits\RedisProxy;
class RedisAdapterTest extends AbstractRedisAdapterTest class RedisAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]); self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]);

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\Cache\Tests\Adapter;
class RedisArrayAdapterTest extends AbstractRedisAdapterTest class RedisArrayAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
if (!class_exists('RedisArray')) { if (!class_exists('RedisArray')) {

View File

@ -17,7 +17,7 @@ use Symfony\Component\Cache\Traits\RedisClusterProxy;
class RedisClusterAdapterTest extends AbstractRedisAdapterTest class RedisClusterAdapterTest extends AbstractRedisAdapterTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!class_exists('RedisCluster')) { if (!class_exists('RedisCluster')) {
self::markTestSkipped('The RedisCluster class is required.'); self::markTestSkipped('The RedisCluster class is required.');

View File

@ -29,7 +29,7 @@ class TagAwareAdapterTest extends AdapterTestCase
return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime)); return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime));
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache');
} }

View File

@ -31,7 +31,7 @@ abstract class AbstractRedisCacheTest extends CacheTestCase
return new RedisCache(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); return new RedisCache(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime);
} }
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('redis')) { if (!\extension_loaded('redis')) {
self::markTestSkipped('Extension redis required.'); self::markTestSkipped('Extension redis required.');
@ -42,7 +42,7 @@ abstract class AbstractRedisCacheTest extends CacheTestCase
} }
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
self::$redis = null; self::$redis = null;
} }

View File

@ -17,7 +17,7 @@ use Symfony\Component\Cache\PruneableInterface;
abstract class CacheTestCase extends SimpleCacheTest abstract class CacheTestCase extends SimpleCacheTest
{ {
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@ -27,7 +27,7 @@ class MemcachedCacheTest extends CacheTestCase
protected static $client; protected static $client;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!MemcachedCache::isSupported()) { if (!MemcachedCache::isSupported()) {
self::markTestSkipped('Extension memcached >=2.2.0 required.'); self::markTestSkipped('Extension memcached >=2.2.0 required.');

View File

@ -24,7 +24,7 @@ class PdoCacheTest extends CacheTestCase
protected static $dbFile; protected static $dbFile;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -36,7 +36,7 @@ class PdoCacheTest extends CacheTestCase
$pool->createTable(); $pool->createTable();
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -25,7 +25,7 @@ class PdoDbalCacheTest extends CacheTestCase
protected static $dbFile; protected static $dbFile;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!\extension_loaded('pdo_sqlite')) { if (!\extension_loaded('pdo_sqlite')) {
self::markTestSkipped('Extension pdo_sqlite required.'); self::markTestSkipped('Extension pdo_sqlite required.');
@ -37,7 +37,7 @@ class PdoDbalCacheTest extends CacheTestCase
$pool->createTable(); $pool->createTable();
} }
public static function tearDownAfterClass() public static function tearDownAfterClass(): void
{ {
@unlink(self::$dbFile); @unlink(self::$dbFile);
} }

View File

@ -50,12 +50,12 @@ class PhpArrayCacheTest extends CacheTestCase
protected static $file; protected static $file;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
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';
} }
protected function tearDown() protected function tearDown(): void
{ {
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

@ -37,12 +37,12 @@ class PhpArrayCacheWithFallbackTest extends CacheTestCase
protected static $file; protected static $file;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
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';
} }
protected function tearDown() protected function tearDown(): void
{ {
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

@ -16,7 +16,7 @@ namespace Symfony\Component\Cache\Tests\Simple;
*/ */
class RedisArrayCacheTest extends AbstractRedisCacheTest class RedisArrayCacheTest extends AbstractRedisCacheTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
if (!class_exists('RedisArray')) { if (!class_exists('RedisArray')) {

View File

@ -18,7 +18,7 @@ use Symfony\Component\Cache\Simple\RedisCache;
*/ */
class RedisCacheTest extends AbstractRedisCacheTest class RedisCacheTest extends AbstractRedisCacheTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
parent::setupBeforeClass(); parent::setupBeforeClass();
self::$redis = RedisCache::createConnection('redis://'.getenv('REDIS_HOST')); self::$redis = RedisCache::createConnection('redis://'.getenv('REDIS_HOST'));

View File

@ -16,7 +16,7 @@ namespace Symfony\Component\Cache\Tests\Simple;
*/ */
class RedisClusterCacheTest extends AbstractRedisCacheTest class RedisClusterCacheTest extends AbstractRedisCacheTest
{ {
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
if (!class_exists('RedisCluster')) { if (!class_exists('RedisCluster')) {
self::markTestSkipped('The RedisCluster class is required.'); self::markTestSkipped('The RedisCluster class is required.');

View File

@ -19,12 +19,12 @@ class ConfigCacheTest extends TestCase
{ {
private $cacheFile = null; private $cacheFile = null;
protected function setUp() protected function setUp(): void
{ {
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
} }
protected function tearDown() protected function tearDown(): void
{ {
$files = [$this->cacheFile, $this->cacheFile.'.meta']; $files = [$this->cacheFile, $this->cacheFile.'.meta'];

View File

@ -18,7 +18,7 @@ class DirectoryResourceTest extends TestCase
{ {
protected $directory; protected $directory;
protected function setUp() protected function setUp(): void
{ {
$this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator'; $this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator';
if (!file_exists($this->directory)) { if (!file_exists($this->directory)) {
@ -27,7 +27,7 @@ class DirectoryResourceTest extends TestCase
touch($this->directory.'/tmp.xml'); touch($this->directory.'/tmp.xml');
} }
protected function tearDown() protected function tearDown(): void
{ {
if (!is_dir($this->directory)) { if (!is_dir($this->directory)) {
return; return;

View File

@ -20,14 +20,14 @@ class FileExistenceResourceTest extends TestCase
protected $file; protected $file;
protected $time; protected $time;
protected function setUp() protected function setUp(): void
{ {
$this->file = realpath(sys_get_temp_dir()).'/tmp.xml'; $this->file = realpath(sys_get_temp_dir()).'/tmp.xml';
$this->time = time(); $this->time = time();
$this->resource = new FileExistenceResource($this->file); $this->resource = new FileExistenceResource($this->file);
} }
protected function tearDown() protected function tearDown(): void
{ {
if (file_exists($this->file)) { if (file_exists($this->file)) {
unlink($this->file); unlink($this->file);

View File

@ -20,7 +20,7 @@ class FileResourceTest extends TestCase
protected $file; protected $file;
protected $time; protected $time;
protected function setUp() protected function setUp(): void
{ {
$this->file = sys_get_temp_dir().'/tmp.xml'; $this->file = sys_get_temp_dir().'/tmp.xml';
$this->time = time(); $this->time = time();
@ -28,7 +28,7 @@ class FileResourceTest extends TestCase
$this->resource = new FileResource($this->file); $this->resource = new FileResource($this->file);
} }
protected function tearDown() protected function tearDown(): void
{ {
if (!file_exists($this->file)) { if (!file_exists($this->file)) {
return; return;

View File

@ -16,7 +16,7 @@ use Symfony\Component\Config\Resource\GlobResource;
class GlobResourceTest extends TestCase class GlobResourceTest extends TestCase
{ {
protected function tearDown() protected function tearDown(): void
{ {
$dir = \dirname(__DIR__).'/Fixtures'; $dir = \dirname(__DIR__).'/Fixtures';
@rmdir($dir.'/TmpGlob'); @rmdir($dir.'/TmpGlob');

View File

@ -20,12 +20,12 @@ class ResourceCheckerConfigCacheTest extends TestCase
{ {
private $cacheFile = null; private $cacheFile = null;
protected function setUp() protected function setUp(): void
{ {
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
} }
protected function tearDown() protected function tearDown(): void
{ {
$files = [$this->cacheFile, "{$this->cacheFile}.meta"]; $files = [$this->cacheFile, "{$this->cacheFile}.meta"];

View File

@ -43,12 +43,12 @@ class ApplicationTest extends TestCase
private $colSize; private $colSize;
protected function setUp() protected function setUp(): void
{ {
$this->colSize = getenv('COLUMNS'); $this->colSize = getenv('COLUMNS');
} }
protected function tearDown() protected function tearDown(): void
{ {
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
putenv('SHELL_VERBOSITY'); putenv('SHELL_VERBOSITY');
@ -56,7 +56,7 @@ class ApplicationTest extends TestCase
unset($_SERVER['SHELL_VERBOSITY']); unset($_SERVER['SHELL_VERBOSITY']);
} }
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); self::$fixturesPath = realpath(__DIR__.'/Fixtures/');
require_once self::$fixturesPath.'/FooCommand.php'; require_once self::$fixturesPath.'/FooCommand.php';

View File

@ -28,7 +28,7 @@ class CommandTest extends TestCase
{ {
protected static $fixturesPath; protected static $fixturesPath;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
self::$fixturesPath = __DIR__.'/../Fixtures/'; self::$fixturesPath = __DIR__.'/../Fixtures/';
require_once self::$fixturesPath.'/TestCommand.php'; require_once self::$fixturesPath.'/TestCommand.php';

View File

@ -21,7 +21,7 @@ class LockableTraitTest extends TestCase
{ {
protected static $fixturesPath; protected static $fixturesPath;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
self::$fixturesPath = __DIR__.'/../Fixtures/'; self::$fixturesPath = __DIR__.'/../Fixtures/';
require_once self::$fixturesPath.'/FooLockCommand.php'; require_once self::$fixturesPath.'/FooLockCommand.php';

View File

@ -25,13 +25,13 @@ class ProgressBarTest extends TestCase
{ {
private $colSize; private $colSize;
protected function setUp() protected function setUp(): void
{ {
$this->colSize = getenv('COLUMNS'); $this->colSize = getenv('COLUMNS');
putenv('COLUMNS=120'); putenv('COLUMNS=120');
} }
protected function tearDown() protected function tearDown(): void
{ {
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
} }

View File

@ -24,12 +24,12 @@ class TableTest extends TestCase
{ {
protected $stream; protected $stream;
protected function setUp() protected function setUp(): void
{ {
$this->stream = fopen('php://memory', 'r+'); $this->stream = fopen('php://memory', 'r+');
} }
protected function tearDown() protected function tearDown(): void
{ {
fclose($this->stream); fclose($this->stream);
$this->stream = null; $this->stream = null;

View File

@ -25,7 +25,7 @@ class InputDefinitionTest extends TestCase
protected $foo1; protected $foo1;
protected $foo2; protected $foo2;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
self::$fixtures = __DIR__.'/../Fixtures/'; self::$fixtures = __DIR__.'/../Fixtures/';
} }

View File

@ -19,12 +19,12 @@ class StreamOutputTest extends TestCase
{ {
protected $stream; protected $stream;
protected function setUp() protected function setUp(): void
{ {
$this->stream = fopen('php://memory', 'a', false); $this->stream = fopen('php://memory', 'a', false);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->stream = null; $this->stream = null;
} }

View File

@ -28,7 +28,7 @@ class SymfonyStyleTest extends TestCase
protected $tester; protected $tester;
private $colSize; private $colSize;
protected function setUp() protected function setUp(): void
{ {
$this->colSize = getenv('COLUMNS'); $this->colSize = getenv('COLUMNS');
putenv('COLUMNS=121'); putenv('COLUMNS=121');
@ -36,7 +36,7 @@ class SymfonyStyleTest extends TestCase
$this->tester = new CommandTester($this->command); $this->tester = new CommandTester($this->command);
} }
protected function tearDown() protected function tearDown(): void
{ {
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
$this->command = null; $this->command = null;

View File

@ -19,13 +19,13 @@ class TerminalTest extends TestCase
private $colSize; private $colSize;
private $lineSize; private $lineSize;
protected function setUp() protected function setUp(): void
{ {
$this->colSize = getenv('COLUMNS'); $this->colSize = getenv('COLUMNS');
$this->lineSize = getenv('LINES'); $this->lineSize = getenv('LINES');
} }
protected function tearDown() protected function tearDown(): void
{ {
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize); putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize);

View File

@ -23,7 +23,7 @@ class ApplicationTesterTest extends TestCase
protected $application; protected $application;
protected $tester; protected $tester;
protected function setUp() protected function setUp(): void
{ {
$this->application = new Application(); $this->application = new Application();
$this->application->setAutoExit(false); $this->application->setAutoExit(false);
@ -38,7 +38,7 @@ class ApplicationTesterTest extends TestCase
$this->tester->run(['command' => 'foo', 'foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); $this->tester->run(['command' => 'foo', 'foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->application = null; $this->application = null;
$this->tester = null; $this->tester = null;

View File

@ -27,7 +27,7 @@ class CommandTesterTest extends TestCase
protected $command; protected $command;
protected $tester; protected $tester;
protected function setUp() protected function setUp(): void
{ {
$this->command = new Command('foo'); $this->command = new Command('foo');
$this->command->addArgument('command'); $this->command->addArgument('command');
@ -38,7 +38,7 @@ class CommandTesterTest extends TestCase
$this->tester->execute(['foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); $this->tester->execute(['foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]);
} }
protected function tearDown() protected function tearDown(): void
{ {
$this->command = null; $this->command = null;
$this->tester = null; $this->tester = null;

View File

@ -23,7 +23,7 @@ class DebugClassLoaderTest extends TestCase
private $loader; private $loader;
protected function setUp() protected function setUp(): void
{ {
$this->errorReporting = error_reporting(E_ALL); $this->errorReporting = error_reporting(E_ALL);
$this->loader = new ClassLoader(); $this->loader = new ClassLoader();
@ -31,7 +31,7 @@ class DebugClassLoaderTest extends TestCase
DebugClassLoader::enable(); DebugClassLoader::enable();
} }
protected function tearDown() protected function tearDown(): void
{ {
DebugClassLoader::disable(); DebugClassLoader::disable();
spl_autoload_unregister([$this->loader, 'loadClass']); spl_autoload_unregister([$this->loader, 'loadClass']);

View File

@ -21,12 +21,12 @@ require_once __DIR__.'/HeaderMock.php';
class ExceptionHandlerTest extends TestCase class ExceptionHandlerTest extends TestCase
{ {
protected function setUp() protected function setUp(): void
{ {
testHeader(); testHeader();
} }
protected function tearDown() protected function tearDown(): void
{ {
testHeader(); testHeader();
} }

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