function BuildTestBase::executeCommand
Same name and namespace in other branches
- 11.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::executeCommand()
Run a command.
Parameters
string $command_line: A command line to run in an isolated process.
string $working_dir: (optional) A working directory relative to the workspace, within which to execute the command. Defaults to the workspace directory.
Return value
\Symfony\Component\Process\Process
2 calls to BuildTestBase::executeCommand()
- LegacyScriptsTest::makeVendorPackage in core/
tests/ Drupal/ BuildTests/ Composer/ LegacyScriptsTest.php - Creates a test package that points to all the projects in vendor.
- LegacyScriptsTest::testVendorTestCodeCleanup in core/
tests/ Drupal/ BuildTests/ Composer/ LegacyScriptsTest.php - @covers ::vendorTestCodeCleanup[[api-linebreak]]
File
-
core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php, line 332
Class
- BuildTestBase
- Provides a workspace to test build processes.
Namespace
Drupal\BuildTests\FrameworkCode
public function executeCommand($command_line, $working_dir = NULL) {
$this->commandProcess = Process::fromShellCommandline($command_line);
$this->commandProcess
->setWorkingDirectory($this->getWorkingPath($working_dir))
->setTimeout(300)
->setIdleTimeout(300);
$this->commandProcess
->run();
return $this->commandProcess;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.