Reporter API
This reference lists reporter and output contracts.
These signatures are the public API.
Output
Namespace: Greenlight\Reporting\Output
A destination for reporter text.
write() sends the exact text to the destination. It does not add, escape,
or buffer text.
interface Output
write()
public function write(string $text): void;
PHPDoc:
@throws ReportingError when the destination cannot accept the text
Reporter
Namespace: Greenlight\Reporting
Converts the run event stream to an output format.
A reporter receives each event in stream order. The stream contains run,
suite, test-class, test, and worker events. Greenlight calls finish() one
time after the final event.
interface Reporter
onEvent()
public function onEvent(Event $event): void;
PHPDoc:
@throws ReportingError when the event cannot be rendered or delivered
finish()
Greenlight calls this method exactly one time after the final event. Reporters with buffers write their buffered text here.
public function finish(): void;
PHPDoc:
@throws ReportingError when the output cannot be rendered or delivered