-
-
Notifications
You must be signed in to change notification settings - Fork 0
EventTracer
Collects PHPUnit events grouped by their concrete event class.
This tracer MUST store every received event instance under its fully qualified class name so tests MAY later inspect which events were emitted and how many times each event type occurred during execution.
The collected events SHALL remain available in memory for the lifetime of this tracer instance. Consumers SHOULD treat the stored event collection as test-support state and SHOULD NOT rely on it for production behavior.
- Full name:
\FastForward\DevTools\PhpUnit\Event\EventTracer - This class implements:
Tracer
Records a PHPUnit event in the internal event registry.
public trace(\PHPUnit\Event\Event $event): voidThis method MUST group the event by its concrete runtime class and SHALL append the received instance to the corresponding event list without discarding previously traced events of the same type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
\PHPUnit\Event\Event | the PHPUnit event instance to record |
Returns the number of traced events for the given event class.
public count(class-string<\PHPUnit\Event\Event> $eventClass): intThis method MUST return the exact number of stored events matching the provided fully qualified event class name. When no events were recorded for the given class, the method SHALL return 0.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$eventClass |
class-string<\PHPUnit\Event\Event> | the fully qualified PHPUnit event |
| class name to count |
Return Value:
the number of recorded events for the specified class