Skip to content

Commit

Permalink
minor #32854 Ensure signatures for setUp|tearDown|setUpAfterClass|tea…
Browse files Browse the repository at this point in the history
…rDownAfterClass methods in tests are compatible with phpunit 8.2 (luispabon)

This PR was squashed before being merged into the 4.3 branch (closes #32854).

Discussion
----------

Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | symfony/symfony#32844
| License       | MIT
| Doc PR        | n/a

Please bear with me as this is my first pr to symfony. Branched off 4.3 as requested here: symfony/symfony#32844

Tests currently do not pass due to:

```
PHP Fatal error:  Declaration of Symfony\Bridge\Monolog\Logger::reset() must be compatible with Monolog\Logger::reset(): void in /home/luis/Projects/symfony/src/Symfony/Bridge/Monolog/Logger.php on line 23
```

Commits
-------

97bcb5da50 Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
  • Loading branch information
nicolas-grekas committed Aug 1, 2019
2 parents db4780a + 0481d06 commit 9e2fead
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/Command/CachePoolDeleteCommandTest.php
Expand Up @@ -23,7 +23,7 @@ class CachePoolDeleteCommandTest extends TestCase
{
private $cachePool;

protected function setUp()
protected function setUp(): void
{
$this->cachePool = $this->getMockBuilder(CacheItemPoolInterface::class)
->getMock();
Expand Down
4 changes: 2 additions & 2 deletions Tests/Command/XliffLintCommandTest.php
Expand Up @@ -131,13 +131,13 @@ private function getKernelAwareApplicationMock()
return $application;
}

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

protected function tearDown()
protected function tearDown(): void
{
foreach ($this->files as $file) {
if (file_exists($file)) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/CachePoolListCommandTest.php
Expand Up @@ -20,7 +20,7 @@
*/
class CachePoolListCommandTest extends AbstractWebTestCase
{
protected function setUp()
protected function setUp(): void
{
static::bootKernel(['test_case' => 'CachePools', 'root_config' => 'config.yml']);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/RouterDebugCommandTest.php
Expand Up @@ -21,7 +21,7 @@ class RouterDebugCommandTest extends AbstractWebTestCase
{
private $application;

protected function setUp()
protected function setUp(): void
{
$kernel = static::createKernel(['test_case' => 'RouterDebug', 'root_config' => 'config.yml']);
$this->application = new Application($kernel);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/TranslationDebugCommandTest.php
Expand Up @@ -21,7 +21,7 @@ class TranslationDebugCommandTest extends AbstractWebTestCase
{
private $application;

protected function setUp()
protected function setUp(): void
{
$kernel = static::createKernel(['test_case' => 'TransDebug', 'root_config' => 'config.yml']);
$this->application = new Application($kernel);
Expand Down

0 comments on commit 9e2fead

Please sign in to comment.