class TestSiteReleaseLocksCommand in Drupal 8
Same name and namespace in other branches
- 9 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 18
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) {
TestDatabase::releaseAllTestLocks();
$output
->writeln('<info>Successfully released all the test database locks</info>');
return 0;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestSiteReleaseLocksCommand:: |
protected | function | Configures the current command. | |
TestSiteReleaseLocksCommand:: |
protected | function | Executes the current command. |