Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable typehint patch on PHPUnit #33042

Merged
merged 1 commit into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ContainerAwareEventManagerTest extends TestCase
private $container;
private $evm;

protected function setUp()
protected function setUp(): void
{
$this->container = new Container();
$this->evm = new ContainerAwareEventManager($this->container);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DoctrineExtensionTest extends TestCase
*/
private $extension;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DoctrineChoiceLoaderTest extends TestCase
*/
private $obj3;

protected function setUp()
protected function setUp(): void
{
$this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock();
$this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CollectionToArrayTransformerTest extends TestCase
*/
private $transformer;

protected function setUp()
protected function setUp(): void
{
$this->transformer = new CollectionToArrayTransformer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase
private $factory;
private $form;

protected function setUp()
protected function setUp(): void
{
$this->collection = new ArrayCollection(['test']);
$this->dispatcher = new EventDispatcher();
Expand All @@ -37,7 +37,7 @@ protected function setUp()
->getForm();
}

protected function tearDown()
protected function tearDown(): void
{
$this->collection = null;
$this->dispatcher = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function getExtensions()
];
}

protected function setUp()
protected function setUp(): void
{
$this->em = DoctrineTestHelper::createTestEntityManager();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class EntityTypeTest extends BaseTypeTest

protected static $supportedFeatureSetVersion = 304;

protected function setUp()
protected function setUp(): void
{
$this->em = DoctrineTestHelper::createTestEntityManager();
$this->emRegistry = $this->createRegistryMock('default', $this->em);
Expand Down Expand Up @@ -90,7 +90,7 @@ protected function setUp()
}
}

protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class ManagerRegistryTest extends TestCase
{
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
if (!class_exists('PHPUnit_Framework_TestCase')) {
self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase

protected $repositoryFactory;

protected function setUp()
protected function setUp(): void
{
$this->repositoryFactory = new TestRepositoryFactory();

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
*/
class ClockMockTest extends TestCase
{
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
ClockMock::register(__CLASS__);
}

protected function setUp()
protected function setUp(): void
{
ClockMock::withClockMock(1234567890.125);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class DnsMockTest extends TestCase
{
protected function tearDown()
protected function tearDown(): void
{
DnsMock::withMockedHosts(array());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp(): void
{
$this->instantiator = new RuntimeInstantiator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ProxyDumperTest extends TestCase
/**
* {@inheritdoc}
*/
protected function setUp()
protected function setUp(): void
{
$this->dumper = new ProxyDumper();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AppVariableTest extends TestCase
*/
protected $appVariable;

protected function setUp()
protected function setUp(): void
{
$this->appVariable = new AppVariable();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ private function createFile($content)
return $filename;
}

protected function setUp()
protected function setUp(): void
{
$this->files = [];
}

protected function tearDown()
protected function tearDown(): void
{
foreach ($this->files as $file) {
if (file_exists($file)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori
*/
private $renderer;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest
*/
private $renderer;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori

private $renderer;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest
*/
private $renderer;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest

protected static $supportedFeatureSetVersion = 403;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest

protected static $supportedFeatureSetVersion = 403;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class WebLinkExtensionTest extends TestCase
*/
private $extension;

protected function setUp()
protected function setUp(): void
{
$this->request = new Request();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class WorkflowExtensionTest extends TestCase
private $extension;
private $t1;

protected function setUp()
protected function setUp(): void
{
if (!class_exists(Workflow::class)) {
$this->markTestSkipped('The Workflow component is needed to run tests for this extension.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class AnnotationsCacheWarmerTest extends TestCase
{
private $cacheDir;

protected function setUp()
protected function setUp(): void
{
$this->cacheDir = sys_get_temp_dir().'/'.uniqid();
$fs = new Filesystem();
$fs->mkdir($this->cacheDir);
parent::setUp();
}

protected function tearDown()
protected function tearDown(): void
{
$fs = new Filesystem();
$fs->remove($this->cacheDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TemplatePathsCacheWarmerTest extends TestCase

private $tmpDir;

protected function setUp()
protected function setUp(): void
{
$this->templateFinder = $this
->getMockBuilder(TemplateFinderInterface::class)
Expand All @@ -59,7 +59,7 @@ protected function setUp()
$this->filesystem->mkdir($this->tmpDir);
}

protected function tearDown()
protected function tearDown(): void
{
$this->filesystem->remove($this->tmpDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ class CacheClearCommandTest extends TestCase
/** @var Filesystem */
private $fs;

protected function setUp()
protected function setUp(): void
{
$this->fs = new Filesystem();
$this->kernel = new TestAppKernel('test', true);
$this->fs->mkdir($this->kernel->getProjectDir());
}

protected function tearDown()
protected function tearDown(): void
{
$this->fs->remove($this->kernel->getProjectDir());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ public function testDebugInvalidDirectory()
$tester->execute(['locale' => 'en', 'bundle' => 'dir']);
}

protected function setUp()
protected function setUp(): void
{
$this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/translations');
$this->fs->mkdir($this->translationDir.'/templates');
}

protected function tearDown()
protected function tearDown(): void
{
$this->fs->remove($this->translationDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ public function testWriteMessagesForSpecificDomain()
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
}

protected function setUp()
protected function setUp(): void
{
$this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/translations');
$this->fs->mkdir($this->translationDir.'/templates');
}

protected function tearDown()
protected function tearDown(): void
{
$this->fs->remove($this->translationDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ private function getKernelAwareApplicationMock()
return $application;
}

protected function setUp()
protected function setUp(): void
{
@mkdir(sys_get_temp_dir().'/yml-lint-test');
$this->files = [];
}

protected function tearDown()
protected function tearDown(): void
{
foreach ($this->files as $file) {
if (file_exists($file)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

class TextDescriptorTest extends AbstractDescriptorTest
{
protected function setUp()
protected function setUp(): void
{
putenv('COLUMNS=121');
}

protected function tearDown()
protected function tearDown(): void
{
putenv('COLUMNS');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class ControllerNameParserTest extends TestCase
{
protected $loader;

protected function setUp()
protected function setUp(): void
{
$this->loader = new ClassLoader();
$this->loader->add('TestBundle', __DIR__.'/../Fixtures');
$this->loader->add('TestApplication', __DIR__.'/../Fixtures');
$this->loader->register();
}

protected function tearDown()
protected function tearDown(): void
{
$this->loader->unregister();
$this->loader = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CachePoolPassTest extends TestCase
{
private $cachePoolPass;

protected function setUp()
protected function setUp(): void
{
$this->cachePoolPass = new CachePoolPass();
}
Expand Down