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:
commit
8c2a67f561
@ -177,7 +177,7 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
|
|||||||
if ($this->expectedDeprecations) {
|
if ($this->expectedDeprecations) {
|
||||||
restore_error_handler();
|
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 {
|
try {
|
||||||
$prefix = "@expectedDeprecation:\n ";
|
$prefix = "@expectedDeprecation:\n ";
|
||||||
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
|
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
|
||||||
|
Reference in New Issue
Block a user