classBehatRunner
final class BehatRunner
implements RunnerExtension
The built-in runner for Behat scenarios selected as file.feature:line.
The line must hold an English Scenario or Scenario Outline header; an outline runs all of its examples. Undefined and pending steps fail the run.
Methods§
public function run(RunnerConfig $config, string $target): TestResultRuns one Behat scenario.
Parameters
$config | RunnerConfig | The Behat command, working directory and timeout |
$target | string | The feature file and the line of the scenario header |
Returns
TestResult The verdict, or an error for a malformed or missing targetThrows
RuntimeException When the temporary report directory cannot be createdTest cases 6
BehatRunnerTest::testRunAcceptsAnAbsoluteFeaturePathcallsBehatRunnerTest::testRunPassesTheTargetAfterTheOptionscallsBehatRunnerTest::testRunReadsTheHeaderAtTheExactLinecallsBehatRunnerTest::testRunRejectsLinesWithoutAScenarioHeadercallsBehatRunnerTest::testRunRejectsMalformedTargetscallsBehatRunnerTest::testRunRunsScenarioAndOutlineAndRejectsUndefinedOrMissingTestscalls
Calls 7
- function-call
preg_matchline 31 - function-call
str_starts_withline 31 - new TestResult line 32
- function-call
is_fileline 35 - function-call
fileline 35 - method-call ProcessRunner::run() line 40
- new ProcessRunner line 40
Test cases 10§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
BehatRunnerTest::testRunAcceptsAnAbsoluteFeaturePathcallsBehatRunnerTest::testRunPassesTheTargetAfterTheOptionscallsBehatRunnerTest::testRunReadsTheHeaderAtTheExactLinecallsBehatRunnerTest::testRunRejectsLinesWithoutAScenarioHeadercallsBehatRunnerTest::testRunRejectsMalformedTargetscallsBehatRunnerTest::testRunRunsScenarioAndOutlineAndRejectsUndefinedOrMissingTestscalls