function PhpUnitTestRunner::startPhpUnitOnSingleTestClass
Starts asynchronous execution of a PHPUnit process.
This method executes the tests for a single test class.
Parameters
\Drupal\Core\Test\TestRun $test_run: The test run object.
class-string $test_class: A fully qualified test class name.
bool $colors: Whether to use colors in output.
bool $suppressDeprecations: If TRUE, disables the deprecation reporting.
Return value
\Symfony\Component\Process\Process The spawned process object.
File
-
core/
lib/ Drupal/ Core/ Test/ PhpUnitTestRunner.php, line 86
Class
- PhpUnitTestRunner
- Run PHPUnit-based tests.
Namespace
Drupal\Core\TestCode
public function startPhpUnitOnSingleTestClass(TestRun $test_run, string $test_class, bool $colors, bool $suppressDeprecations) : Process {
$command = $this->prepareCommand($test_run, $test_class, $colors, $suppressDeprecations);
$test_run->start(microtime(TRUE));
$process = new Process($command['cli_command'], $command['work_dir'], $command['environment_vars']);
$process->setTimeout(NULL);
$process->start();
return $process;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.