Skip to content

Commit 0a97b0d

Browse files
authored
Update TestListener
1 parent 830943c commit 0a97b0d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/TestListener.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
namespace MyBuilder\PhpunitAccelerator;
44

5-
use PHPUnit\Framework\BaseTestListener;
5+
use PHPUnit\Framework\TestListener as BaseTestListener;
6+
use PHPUnit\Framework\TestListenerDefaultImplementation;
67

7-
if (!interface_exists('\PHPUnit\Framework\Test')) {
8-
class_alias('\PHPUnit_Framework_Test', '\PHPUnit\Framework\Test');
9-
}
10-
11-
class TestListener extends BaseTestListener
8+
class TestListener implements BaseTestListener
129
{
10+
use TestListenerDefaultImplementation;
11+
1312
private $ignorePolicy;
1413

1514
const PHPUNIT_PROPERTY_PREFIX = 'PHPUnit_';
@@ -19,7 +18,7 @@ public function __construct(IgnoreTestPolicy $ignorePolicy = null)
1918
$this->ignorePolicy = ($ignorePolicy) ?: new NeverIgnoreTestPolicy();
2019
}
2120

22-
public function endTest(\PHPUnit\Framework\Test $test, $time)
21+
public function endTest(\PHPUnit\Framework\Test $test, float $time): void
2322
{
2423
$testReflection = new \ReflectionObject($test);
2524

0 commit comments

Comments
 (0)