function TestSiteTearDownCommand::configure

Same name in other branches
  1. 9 core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php \Drupal\TestSite\Commands\TestSiteTearDownCommand::configure()
  2. 10 core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php \Drupal\TestSite\Commands\TestSiteTearDownCommand::configure()
  3. 11.x core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php \Drupal\TestSite\Commands\TestSiteTearDownCommand::configure()

File

core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php, line 25

Class

TestSiteTearDownCommand
Command to tear down a test Drupal site.

Namespace

Drupal\TestSite\Commands

Code

protected function configure() {
    $this->setName('tear-down')
        ->setDescription('Removes a test site added by the install command')
        ->setHelp('All the database tables and files will be removed.')
        ->addArgument('db-prefix', InputArgument::REQUIRED, 'The database prefix for the test site.')
        ->addOption('db-url', NULL, InputOption::VALUE_OPTIONAL, 'URL for database. Defaults to the environment variable SIMPLETEST_DB.', getenv('SIMPLETEST_DB'))
        ->addOption('keep-lock', NULL, InputOption::VALUE_NONE, 'Keeps the database prefix lock. Useful for ensuring test isolation when running concurrent tests.')
        ->addUsage('test12345678')
        ->addUsage('test12345678 --db-url "mysql://username:password@localhost/databasename#table_prefix"')
        ->addUsage('test12345678 --keep-lock');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.