TestRunner
in package
Table of Contents
Methods
- __construct() : mixed
- excludeTests() : $this
- filterByGroup() : $this
- getFailedTests() : array<string|int, string>
- getGeneratedFiles() : array<string|int, string>
- getRunTime() : int|null
- Get last run time in seconds
- getSkippedTests() : array<string|int, string>
- getTestFiles() : array<string|int, string>
- getTotalTestCount() : int
- only() : $this
- preserveOutputFiles() : $this
- printSummary() : $this
- Outputs a summary of the last test suite run
- runTests() : bool
- stopOn() : $this
- withTestExecutor() : $this
Methods
__construct()
public __construct(mixed $exampleDir)
: mixed
Parameters
- $exampleDir : mixed
excludeTests()
public excludeTests(array<string|int,
mixed> $excluded)
: $this
Parameters
- $excluded : array<string|int, mixed>
Return values
$thisfilterByGroup()
public filterByGroup(array<string|int,
mixed> $groups)
: $this
Parameters
- $groups : array<string|int, mixed>
Return values
$thisgetFailedTests()
public getFailedTests()
: array<string|int,
string>
Return values
array<string|int, string>getGeneratedFiles()
public getGeneratedFiles()
: array<string|int,
string>
Return values
array<string|int, string>getRunTime()
Get last run time in seconds
public getRunTime()
: int|null
Return values
int|nullgetSkippedTests()
public getSkippedTests()
: array<string|int,
string>
Return values
array<string|int, string>getTestFiles()
public getTestFiles()
: array<string|int,
string>
Return values
array<string|int, string>getTotalTestCount()
public getTotalTestCount()
: int
Return values
intonly()
public only(array<string|int,
mixed> $files)
: $this
Parameters
- $files : array<string|int, mixed>
Return values
$thispreserveOutputFiles()
public preserveOutputFiles([bool $preserve
= true
]) : $this
Parameters
- $preserve : bool = true
Return values
$thisprintSummary()
Outputs a summary of the last test suite run
public printSummary()
: $this
Return values
$thisrunTests()
public runTests(string $outputDir)
: bool
Parameters
- $outputDir : string
-
Path to output folder
Return values
bool —TRUE if all tests passed, FALSE otherwise
stopOn()
public stopOn(array<string|int,
string> $conditions)
: $this
Parameters
- $conditions : array<string|int, string>
Return values
$thiswithTestExecutor()
public withTestExecutor(TestExecutor $testExecutor)
: $this
Parameters
- $testExecutor : TestExecutor