8000 bug #20638 Fix legacy tests that do not trigger any depreciation (jul… · symfony/symfony@942cfc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 942cfc9

Browse files
bug #20638 Fix legacy tests that do not trigger any depreciation (julienfalque)
This PR was merged into the 3.2 branch. Discussion ---------- Fix legacy tests that do not trigger any depreciation | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Fixes `implode(): Invalid arguments passed` error when a `@legacy` test with `@expectedDeprecation` does not actually trigger any deprecation. Commits ------- 9287b52 Fix tests that do not trigger any depreciation
2 parents 91aaa44 + 9287b52 commit 942cfc9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
2525
private $skippedFile = false;
2626
private $wasSkipped = array();
2727
private $isSkipped = array();
28-
private $expectedDeprecations;
29-
private $gatheredDeprecations;
28+
private $expectedDeprecations = array();
29+
private $gatheredDeprecations = array();
3030
private $previousErrorHandler;
3131

3232
/**
@@ -181,7 +181,8 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
181181
$test->getTestResultObject()->addFailure($test, $e, $time);
182182
}
183183

184-
$this->expectedDeprecations = $this->gatheredDeprecations = $this->previousErrorHandler = null;
184+
$this->expectedDeprecations = $this->gatheredDeprecations = array();
185+
$this->previousErrorHandler = null;
185186
}
186187
if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) {
187188
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false));

0 commit comments

Comments
 (0)
0