interface RunnerExtension
Public API: explicitly declared with @visibility public.

Executes one linked test target and reports what actually ran.

Configuration chooses how a runner executes; definitions choose which target it runs. A passing result needs the "passed" status and at least one executed test.

Implementing a runner that knows no targetsdoctest
$runner = new class () implements \Requirements\Test\RunnerExtension { public function run(\Requirements\Test\RunnerConfig $config, string $target): \Requirements\Test\TestResult { return new \Requirements\Test\TestResult('error', 0, "Unknown target: $target"); } };
    $runner->run(new \Requirements\Test\RunnerConfig('custom', ['true'], '/'), 'login')->message // => 'Unknown target: login'

Methods§

public function run(RunnerConfig $config, string $target): TestResult

Runs one test target.

Parameters

$configRunnerConfigHow the runner executes: command, working directory and timeout
$targetstringThe test selection written in an item's tests entry

Returns

TestResult The status, the number of executed tests and a message on failure

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Implemented by 3
Constant reads 1
Type declarations 1