skip tests with failure and error states too

This commit is contained in:
Christian Flothmann 2017-01-02 18:41:18 +01:00
parent a89f60bbe8
commit f3bb206f12

View File

@ -175,7 +175,7 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
if ($this->expectedDeprecations) {
restore_error_handler();
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR), true)) {
try {
$prefix = "@expectedDeprecation:\n ";
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));