8000 Count @expectedDeprecation as an assertion · symfony/symfony@ba5c0f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba5c0f4

Browse files
committed
Count @expectedDeprecation as an assertion
1 parent 4d91022 commit ba5c0f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ public function startTest(\PHPUnit_Framework_Test $test)
186186
public function endTest(\PHPUnit_Framework_Test $test, $time)
187187
{
188188
if ($this->expectedDeprecations) {
189+
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
190+
$test->addToAssertionCount(count($this->expectedDeprecations));
191+
}
192+
189193
restore_error_handler();
190194

191195
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)) {

0 commit comments

Comments
 (0)
0