respect skipped and incomplete tests
This commit is contained in:
parent
1678303549
commit
0c060931ee
@ -174,11 +174,14 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
|
||||
{
|
||||
if ($this->expectedDeprecations) {
|
||||
restore_error_handler();
|
||||
try {
|
||||
$prefix = "@expectedDeprecation:\n ";
|
||||
$test->assertStringMatchesFormat($prefix.implode("\n ", $this->expectedDeprecations), $prefix.implode("\n ", $this->gatheredDeprecations));
|
||||
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
|
||||
$test->getTestResultObject()->addFailure($test, $e, $time);
|
||||
|
||||
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
|
||||
try {
|
||||
$prefix = "@expectedDeprecation:\n ";
|
||||
$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();
|
||||
|
Reference in New Issue
Block a user