DevToolsExtension

Class
implements Extension
Read only: Yes Final: Yes

Registers the Joli notification tracer within the PHPUnit extension lifecycle.

Description

This extension MUST register a tracer capable of observing PHPUnit events so that desktop notifications can be dispatched when the test execution finishes.

The tracer dependency MAY be overridden to allow alternative notification strategies or custom tracing behavior, but any provided implementation MUST satisfy PHPUnit's tracer contract.

Table of Contents

Interfaces

Properties

 : ExecutionFinishedSubscriber
 : StartedSubscriber
 : Tracer

Methods

__construct()

Creates a new extension instance.

 : mixed
bootstrap()

Bootstraps the extension and registers its tracer with PHPUnit.

 : void
Properties

$executionFinishedSubscriber

Private
private ExecutionFinishedSubscriber $executionFinishedSubscriber

$startedSubscriber

Private
private StartedSubscriber $startedSubscriber = new ByPassfinalsStartedSubscriber()
Methods

__construct()

Public

Creates a new extension instance.

public __construct([Tracer  $tracer = new EventTracer()][, StartedSubscriber  $startedSubscriber = new ByPassfinalsStartedSubscriber()][, ExecutionFinishedSubscriber|null  $executionFinishedSubscriber = null]) : mixed

Description

When no tracer is explicitly provided, the default Joli notification tracer SHALL be used.

Parameters
$tracer : Tracer = new EventTracer()

Description

the tracer instance responsible for collecting PHPUnit events and producing notifications

$startedSubscriber : StartedSubscriber = new ByPassfinalsStartedSubscriber()
$executionFinishedSubscriber : ExecutionFinishedSubscriber|null = null

bootstrap()

Public

Bootstraps the extension and registers its tracer with PHPUnit.

public bootstrap(Configuration  $configuration, Facade  $facade, ParameterCollection  $parameters) : void

Description

This method MUST register the configured tracer with the provided facade so that the tracer can receive PHPUnit execution events during the test run. The configuration and parameter collection are part of the extension contract and MAY be used by future implementations, even though they are not currently required by this implementation.

Parameters
$configuration : Configuration

Description

the resolved PHPUnit runtime configuration

$facade : Facade

Description

the PHPUnit extension facade used to register runtime integrations

$parameters : ParameterCollection

Description

the user-defined extension parameters passed by PHPUnit

Tags
codeCoverageIgnore