public function DbCommandBaseTest::testSpecifyDatabaseDoesNotExist in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTest::testSpecifyDatabaseDoesNotExist()
Invalid database names will throw a useful exception.
@expectedException \Drupal\Core\Database\ConnectionNotDefinedException
File
- core/modules/ system/ tests/ src/ Kernel/ Scripts/ DbCommandBaseTest.php, line 48 
- Contains \Drupal\Tests\system\Kernel\Scripts\DbCommandBaseTest.
Class
- DbCommandBaseTest
- Test that the DbToolsApplication works correctly.
Namespace
Drupal\Tests\system\Kernel\ScriptsCode
public function testSpecifyDatabaseDoesNotExist() {
  $command = new DbCommandBaseTester();
  $command_tester = new CommandTester($command);
  $command_tester
    ->execute([
    '--database' => 'dne',
  ]);
  $command
    ->getDatabaseConnection($command_tester
    ->getInput());
}