function BuildTestBase::executeCommand
Same name in other branches
- 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::executeCommand()
- 8.9.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::executeCommand()
- 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
15 calls to BuildTestBase::executeCommand()
- BuildTestTest::testWorkspace in core/
tests/ Drupal/ BuildTests/ Framework/ Tests/ BuildTestTest.php - Ensure that workspaces work.
- ComponentsIsolatedBuildTest::addExpectedRepositories in core/
tests/ Drupal/ BuildTests/ Composer/ Component/ ComponentsIsolatedBuildTest.php - Adds expected repositories as path repositories to package under test.
- ComponentsIsolatedBuildTest::testComponentComposerJson in core/
tests/ Drupal/ BuildTests/ Composer/ Component/ ComponentsIsolatedBuildTest.php - Test whether components' composer.json can be installed in isolation.
- ComponentsTaggedReleaseTest::testReleaseTagging in core/
tests/ Drupal/ BuildTests/ Composer/ Component/ ComponentsTaggedReleaseTest.php - Validate release tagging and regeneration of dependencies.
- ComposerBuildTestBase::assertDrupalVersion in core/
tests/ Drupal/ BuildTests/ Composer/ ComposerBuildTestBase.php - Assert that the VERSION constant in Drupal.php is the expected value.
File
-
core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php, line 325
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.