Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing arguments when calling the legacy extension #609

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ServerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(private $extension)

public function notify(TestStartedEvent $event): void
{
$this->extension->executeBeforeTest();
$this->extension->executeBeforeTest($event->test()->name());
}
});

Expand All @@ -89,7 +89,7 @@ public function __construct(private $extension)

public function notify(TestFinishedEvent $event): void
{
$this->extension->executeAfterTest();
$this->extension->executeAfterTest($event->test()->name(), (float) $event->telemetryInfo()->time()->seconds());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced the $time should be in seconds, especially when the value should be a float, but the value isn't used in the legacy extension anyway, so this effectively mutes the error.

}
});

Expand All @@ -100,7 +100,7 @@ public function __construct(private $extension)

public function notify(Errored $event): void
{
$this->extension->executeAfterTestError();
$this->extension->executeAfterTestError($event->test()->name(), $event->throwable()->message(), (float) $event->telemetryInfo()->time()->seconds());
}
});

Expand All @@ -111,7 +111,7 @@ public function __construct(private $extension)

public function notify(Failed $event): void
{
$this->extension->executeAfterTestFailure();
$this->extension->executeAfterTestFailure($event->test()->name(), $event->throwable()->message(), (float) $event->telemetryInfo()->time()->seconds());
}
});
}
Expand Down
Loading