bug #21138 [PhpUnitBridge] skip tests with failure and error states too (xabbuh)

This PR was merged into the 3.2 branch.

Discussion
----------

[PhpUnitBridge] skip tests with failure and error states too

| 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        |

I was actually wrong by not excluding failures and errors to in #21121.

Commits
-------

f3bb206f12 skip tests with failure and error states too
This commit is contained in:
Fabien Potencier 2017-01-02 14:07:15 -08:00
commit 8c2a67f561

View File

@ -177,7 +177,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));