bug #21121 [PhpUnitBridge] respect skipped and incomplete tests (xabbuh)
This PR was merged into the 3.2 branch.
Discussion
----------
[PhpUnitBridge] respect skipped and incomplete tests
| 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 |
Commits
-------
0c06093
respect skipped and incomplete tests
This commit is contained in:
commit
508db68d2a
@ -174,11 +174,14 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
|
|||||||
{
|
{
|
||||||
if ($this->expectedDeprecations) {
|
if ($this->expectedDeprecations) {
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
try {
|
|
||||||
$prefix = "@expectedDeprecation:\n ";
|
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
|
||||||
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
|
try {
|
||||||
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
|
$prefix = "@expectedDeprecation:\n ";
|
||||||
$test->getTestResultObject()->addFailure($test, $e, $time);
|
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
|
||||||
|
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
|
||||||
|
$test->getTestResultObject()->addFailure($test, $e, $time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->expectedDeprecations = $this->gatheredDeprecations = array();
|
$this->expectedDeprecations = $this->gatheredDeprecations = array();
|
||||||
|
Reference in New Issue
Block a user