Skip to content
docsv0.24.0

TestDiscoveryHandler

Discovers PHPUnit test classes and their assertions statically, without booting or running a suite. PHPUnit's list mode still boots configuration and application code. This handler instead tokenizes files under `tests/`, which makes discovery a read operation and keeps top-level fixture code inert.

TestDiscoveryHandler::__construct()

public function __construct(Milpa\DevTools\Support\RootResolver $roots = new RootResolver()):

Parameters

Parameters of __construct()
NameTypeDescription
$rootsMilpa\DevTools\Support\RootResolver

TestDiscoveryHandler::handleList()

public function handleList(array $input): array

Lists test classes, optionally narrowed by their plugin, artifact, or behavioral criterion.

Parameters

Parameters of handleList()
NameTypeDescription
$inputarray<string, mixed>

TestDiscoveryHandler::handleShow()

public function handleShow(array $input): array

Shows one test class with each test method's criterion and static assertion calls.

Parameters

Parameters of handleShow()
NameTypeDescription
$inputarray<string, mixed>