Count @expectedDeprecation as an assertion

This commit is contained in:
Wouter J 2017-03-06 15:34:47 +01:00 committed by WouterJ
parent 4d91022480
commit ba5c0f4a47

View File

@ -186,6 +186,10 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
public function endTest(\PHPUnit_Framework_Test $test, $time)
{
if ($this->expectedDeprecations) {
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
$test->addToAssertionCount(count($this->expectedDeprecations));
}
restore_error_handler();
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)) {