Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / src / Kernel / Scripts / DbToolsApplicationTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Kernel\Scripts;
4
5 use Drupal\Core\Command\DbToolsApplication;
6 use Drupal\KernelTests\KernelTestBase;
7
8 /**
9  * Test that the DbToolsApplication works correctly.
10  *
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.
13  *
14  * @group console
15  */
16 class DbToolsApplicationTest extends KernelTestBase {
17
18   /**
19    * Test that the dump command is correctly registered.
20    */
21   public function testDumpCommandRegistration() {
22     $application = new DbToolsApplication();
23     $command = $application->find('dump');
24     $this->assertInstanceOf('\Drupal\Core\Command\DbDumpCommand', $command);
25   }
26
27   /**
28    * Test that the dump command is correctly registered.
29    */
30   public function testImportCommandRegistration() {
31     $application = new DbToolsApplication();
32     $command = $application->find('import');
33     $this->assertInstanceOf('\Drupal\Core\Command\DbImportCommand', $command);
34   }
35
36 }