Browse documentation

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

View source

write()

public function write(string $text): void;

PHPDoc:

View source

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

View source

onEvent()

public function onEvent(Event $event): void;

PHPDoc:

View source

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:

View source