Job
class Job
Spawns an isolated PHP process for a single test and captures its output and exit code.
Constants
| CodeNone |
|
| CodeOk |
|
| CodeSkip |
|
| CodeFail |
|
| CodeError |
|
| RunSleep |
waiting time between process activity check in microseconds |
Methods
void
setTempDirectory(string|null $path)
No description
void
setEnvironmentVariable(string $name, string $value)
No description
string
getEnvironmentVariable(string $name)
No description
void
run(bool $async = false)
Runs single test.
bool
isRunning()
Checks if the test is still running.
int
getExitCode()
Returns exit code.
array
getHeaders()
Returns output headers.
float|null
getDuration()
Returns process duration in seconds.
static void
waitForActivity(array $jobs)
Waits for activity on any of the running jobs.
Details
at line 50
__construct(Test $test, PhpInterpreter $interpreter, array|null $envVars = null)
No description
at line 65
void
setTempDirectory(string|null $path)
No description
at line 73
void
setEnvironmentVariable(string $name, string $value)
No description
at line 79
string
getEnvironmentVariable(string $name)
No description
at line 88
void
run(bool $async = false)
Runs single test.
at line 133
bool
isRunning()
Checks if the test is still running.
at line 193
Test
getTest()
No description
at line 202
int
getExitCode()
Returns exit code.
at line 212
array
getHeaders()
Returns output headers.
at line 221
float|null
getDuration()
Returns process duration in seconds.
at line 233
static void
waitForActivity(array $jobs)
Waits for activity on any of the running jobs.