3 namespace Drupal\Tests\system\Kernel\Scripts;
5 use Drupal\Core\Command\DbToolsApplication;
6 use Drupal\KernelTests\KernelTestBase;
9 * Test that the DbToolsApplication works correctly.
11 * The way console application's run it is impossible to test. For now we only
12 * test that we are registering the correct commands.
16 class DbToolsApplicationTest extends KernelTestBase {
19 * Test that the dump command is correctly registered.
21 public function testDumpCommandRegistration() {
22 $application = new DbToolsApplication();
23 $command = $application->find('dump');
24 $this->assertInstanceOf('\Drupal\Core\Command\DbDumpCommand', $command);
28 * Test that the dump command is correctly registered.
30 public function testImportCommandRegistration() {
31 $application = new DbToolsApplication();
32 $command = $application->find('import');
33 $this->assertInstanceOf('\Drupal\Core\Command\DbImportCommand', $command);