Skip to content

ByPassfinalsStartedSubscriber

github-actions edited this page Apr 2, 2026 · 1 revision

Enables BypassFinals when the PHPUnit test suite starts.

This subscriber MUST activate BypassFinals as soon as the test suite start event is emitted so that final classes, final methods, and readonly protections can be bypassed where the test environment requires that behavior.

This subscriber SHALL perform only the activation side effect associated with the test suite start event.


  • Full name: \FastForward\DevTools\PhpUnit\Event\TestSuite\ByPassfinalsStartedSubscriber
  • This class is marked as final and can't be subclassed
  • This class implements: StartedSubscriber
  • This class is a Final class

Methods

notify

Handles the PHPUnit test suite started event.

public notify(\PHPUnit\Event\TestSuite\Started $event): void

This method MUST enable BypassFinals for the current test execution context when the test suite starts.

Parameters:

Parameter Type Description
$event \PHPUnit\Event\TestSuite\Started the emitted test suite started event

Clone this wiki locally