interfaceRunnerExtension
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.
$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): TestResultRuns one test target.
Parameters
$config | RunnerConfig | How the runner executes: command, working directory and timeout |
$target | string | The test selection written in an item's tests entry |
Returns
TestResult The status, the number of executed tests and a message on failureTest cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
RunnerExtensionTestcalls
Other tests reaching this symbol 1
CountingRunnercalls