8000 bug #24796 [PhpUnitBridge] Fixed fatal error in CoverageListener when… · symfony/symfony@107881f · GitHub
[go: up one dir, main page]

Skip to content

Commit 107881f

Browse files
committed
bug #24796 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass (lyrixx)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 25e0117 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass
2 parents 2e3df94 + 25e0117 commit 107881f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\PhpUnit\Legacy;
1313

1414
use PHPUnit\Framework\Test;
15+
use PHPUnit\Framework\TestCase;
1516
use PHPUnit\Framework\Warning;
1617

1718
/**
@@ -36,6 +37,10 @@ public function __construct(callable $sutFqcnResolver = null, $warningOnSutNotFo
3637

3738
public function startTest($test)
3839
{
40+
if (!$test instanceof TestCase) {
41+
return;
42+
}
43+
3944
$annotations = $test->getAnnotations();
4045

4146
$ignoredAnnotations = array('covers', 'coversDefaultClass', 'coversNothing');

0 commit comments

Comments
 (0)
0