feature #21828 [PhpUnitBridge] include expected deprecations in assertion counter (xabbuh)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[PhpUnitBridge] include expected deprecations in assertion counter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21786#issuecomment-283074426
| License | MIT
| Doc PR |
We still need to include the changes from #21786 as we cannot increment the number of assertions in the `startTest()` method (the PHPUnit test runner resets the counter after the listeners have been executed).
Commits
-------
cdcd5ae
include expected deprecations in assertion counter
This commit is contained in:
commit
18315b4922
@ -246,6 +246,10 @@ class SymfonyTestsListenerTrait
|
||||
}
|
||||
|
||||
if ($this->expectedDeprecations) {
|
||||
if (!in_array($test->getStatus(), array($BaseTestRunner::STATUS_SKIPPED, $BaseTestRunner::STATUS_INCOMPLETE), true)) {
|
||||
$test->addToAssertionCount(count($this->expectedDeprecations));
|
||||
}
|
||||
|
||||
restore_error_handler();
|
||||
|
||||
if (!in_array($test->getStatus(), array($BaseTestRunner::STATUS_SKIPPED, $BaseTestRunner::STATUS_INCOMPLETE, $BaseTestRunner::STATUS_FAILURE, $BaseTestRunner::STATUS_ERROR), true)) {
|
||||
|
Reference in New Issue
Block a user