8000 [PhpUnitBridge] Fixed fatal error in CoverageListener when something … · symfony/symfony@25e0117 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25e0117

Browse files
committed
[PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass
1 parent 2e3df94 commit 25e0117

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