diff --git a/packages/testing/src/Requirements/PhpUnit/Extension.php b/packages/testing/src/Requirements/PhpUnit/Extension.php index a83a32608..2a3e8ede1 100644 --- a/packages/testing/src/Requirements/PhpUnit/Extension.php +++ b/packages/testing/src/Requirements/PhpUnit/Extension.php @@ -4,7 +4,6 @@ use LastDragon_ru\LaraASP\Testing\Requirements\Requirement; use Override; -use PHPUnit\Event\Test\BeforeFirstTestMethodCalledSubscriber; use PHPUnit\Event\Test\BeforeTestMethodCalledSubscriber; use PHPUnit\Event\Test\PreConditionCalledSubscriber; use PHPUnit\Event\Test\PreparedSubscriber; @@ -28,9 +27,6 @@ public function bootstrap(Configuration $configuration, Facade $facade, Paramete $checker = new Checker(); $facade->registerSubscribers( - new class ($checker) extends Listener implements BeforeFirstTestMethodCalledSubscriber { - // empty - }, new class ($checker) extends Listener implements BeforeTestMethodCalledSubscriber { // empty }, diff --git a/packages/testing/src/Requirements/PhpUnit/Listener.php b/packages/testing/src/Requirements/PhpUnit/Listener.php index c044b80ef..c4d84358c 100644 --- a/packages/testing/src/Requirements/PhpUnit/Listener.php +++ b/packages/testing/src/Requirements/PhpUnit/Listener.php @@ -4,7 +4,6 @@ use PHPUnit\Event\Code\TestMethod; use PHPUnit\Event\Event; -use PHPUnit\Event\Test\BeforeFirstTestMethodCalled; use PHPUnit\Event\Test\BeforeTestMethodCalled; use PHPUnit\Event\Test\PreConditionCalled; use PHPUnit\Event\Test\Prepared; @@ -48,11 +47,7 @@ protected function getTarget(Event $event): array { $class = null; $method = null; - if ( - $event instanceof BeforeFirstTestMethodCalled - || $event instanceof BeforeTestMethodCalled - || $event instanceof PreConditionCalled - ) { + if ($event instanceof BeforeTestMethodCalled || $event instanceof PreConditionCalled) { $class = $event->testClassName(); } elseif ($event instanceof Prepared) { $test = $event->test();