public function DbDumpCommandTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php \Drupal\Tests\system\Kernel\Scripts\DbDumpCommandTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Kernel/ Scripts/ DbDumpCommandTest.php, line 30 - Contains \Drupal\Tests\system\Kernel\Scripts\DbDumpCommandTest.
Class
- DbDumpCommandTest
- Test that the DbDumpCommand works correctly.
Namespace
Drupal\Tests\system\Kernel\ScriptsCode
public function setUp() {
parent::setUp();
// Determine what database backend is running, and set the skip flag.
if (Database::getConnection()
->databaseType() !== 'mysql') {
$this
->markTestSkipped("Skipping test since the DbDumpCommand is currently only compatible with MySQL");
}
$this
->installSchema('system', 'router');
/** @var \Drupal\Core\Database\Connection $connection */
$connection = $this->container
->get('database');
$connection
->insert('router')
->fields([
'name',
'path',
'pattern_outline',
])
->values([
'test',
'test',
'test',
])
->execute();
}