Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DefaultPhpProcess.php

function DefaultPhpProcess::runJob

Runs a single job (PHP code) using a separate PHP process.

@psalm-return array{stdout: string, stderr: string}

Throws

Exception

PhpProcessException

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\PHP

Code

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);
}
RSS feed
Powered by Drupal