class TestSiteReleaseLocksCommand
Same name in other branches
- 9 core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php \Drupal\TestSite\Commands\TestSiteReleaseLocksCommand
- 8.9.x core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php \Drupal\TestSite\Commands\TestSiteReleaseLocksCommand
- 10 core/tests/Drupal/TestSite/Commands/TestSiteReleaseLocksCommand.php \Drupal\TestSite\Commands\TestSiteReleaseLocksCommand
Command to release all test site database prefix locks.
Note that this command can't be safely tested by DrupalCI without potentially causing random failures.
@internal
Hierarchy
- class \Drupal\TestSite\Commands\TestSiteReleaseLocksCommand extends \Symfony\Component\Console\Command\Command
Expanded class hierarchy of TestSiteReleaseLocksCommand
1 file declares its use of TestSiteReleaseLocksCommand
- TestSiteApplication.php in core/
tests/ Drupal/ TestSite/ TestSiteApplication.php
File
-
core/
tests/ Drupal/ TestSite/ Commands/ TestSiteReleaseLocksCommand.php, line 20
Namespace
Drupal\TestSite\CommandsView source
class TestSiteReleaseLocksCommand extends Command {
/**
* {@inheritdoc}
*/
protected function configure() {
$this->setName('release-locks')
->setDescription('Releases all test site locks')
->setHelp('The locks ensure test site database prefixes are not reused.');
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) : int {
$root = dirname(__DIR__, 5);
chdir($root);
TestDatabase::releaseAllTestLocks();
$output->writeln('<info>Successfully released all the test database locks</info>');
return 0;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
TestSiteReleaseLocksCommand::configure | protected | function | |
TestSiteReleaseLocksCommand::execute | protected | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.