function DefaultPhpProcess::runJob
Runs a single job (PHP code) using a separate PHP process.
@psalm-return array{stdout: string, stderr: string}
Throws
Overrides AbstractPhpProcess::runJob
File
-
vendor/
phpunit/ phpunit/ src/ Util/ PHP/ DefaultPhpProcess.php, line 43
Class
- DefaultPhpProcess
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Util\PHPCode
public function runJob(string $job, array $settings = []) : array {
if ($this->stdin) {
if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'phpunit_')) || file_put_contents($this->tempFile, $job) === false) {
throw new PhpProcessException('Unable to write temporary file');
}
$job = $this->stdin;
}
return $this->runProcess($job, $settings);
}