Skip to content

Commit

Permalink
Hook on finished instead of passed test event
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Nov 28, 2023
1 parent e965498 commit 664e23d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<code>($durationInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1_000</code>
</InvalidOperand>
</file>
<file src="src/Subscriber/TestPassedSubscriber.php">
<file src="src/Subscriber/TestFinishedSubscriber.php">
<InternalClass>
<code>Metadata\Annotation\Parser\Registry::getInstance()</code>
</InternalClass>
Expand All @@ -34,7 +34,7 @@
<code>$maximumDuration</code>
</MixedAssignment>
<UnusedClass>
<code>TestPassedSubscriber</code>
<code>TestFinishedSubscriber</code>
</UnusedClass>
</file>
<file src="src/Subscriber/TestPreparedSubscriber.php">
Expand Down
2 changes: 1 addition & 1 deletion src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function bootstrap(

$facade->registerSubscribers(
new Subscriber\TestPreparedSubscriber($timeKeeper),
new Subscriber\TestPassedSubscriber(
new Subscriber\TestFinishedSubscriber(
$maximumDuration,
$timeKeeper,
$collector,
Expand Down
4 changes: 2 additions & 2 deletions src/Subscriber/TestFinishedSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* @internal
*/
final class TestPassedSubscriber implements Event\Test\PassedSubscriber
final class TestFinishedSubscriber implements Event\Test\FinishedSubscriber
{
public function __construct(
private readonly Duration $maximumDuration,
Expand All @@ -35,7 +35,7 @@ public function __construct(
) {
}

public function notify(Event\Test\Passed $event): void
public function notify(Event\Test\Finished $event): void
{
$testIdentifier = TestIdentifier::fromString($event->test()->id());

Expand Down

0 comments on commit 664e23d

Please sign in to comment.