Skip to content

Commit fad9f0a

Browse files
committed
respect skipped and incomplete tests
1 parent 1678303 commit fad9f0a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,14 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
174174
{
175175
if ($this->expectedDeprecations) {
176176
restore_error_handler();
177-
try {
178-
$prefix = "@expectedDeprecation:\n ";
179-
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
180-
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
181-
$test->getTestResultObject()->addFailure($test, $e, $time);
177+
178+
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE))) {
179+
try {
180+
$prefix = "@expectedDeprecation:\n ";
181+
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
182+
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
183+
$test->getTestResultObject()->addFailure($test, $e, $time);
184+
}
182185
}
183186

184187
$this->expectedDeprecations = $this->gatheredDeprecations = array();

0 commit comments

Comments
 (0)