protected function NodeMigrationTypePluginAlterTest::setupDb in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php \Drupal\Tests\migrate_drupal\Kernel\NodeMigrationTypePluginAlterTest::setupDb()
Creates data in the source database.
1 call to NodeMigrationTypePluginAlterTest::setupDb()
- NodeMigrationTypePluginAlterTest::setUp in core/
modules/ migrate_drupal/ tests/ src/ Kernel/ NodeMigrationTypePluginAlterTest.php
File
- core/
modules/ migrate_drupal/ tests/ src/ Kernel/ NodeMigrationTypePluginAlterTest.php, line 124
Class
- NodeMigrationTypePluginAlterTest
- Tests the assignment of the node migration type in migrations_plugin_alter.
Namespace
Drupal\Tests\migrate_drupal\KernelCode
protected function setupDb() {
$this->sourceDatabase
->schema()
->createTable('system', [
'fields' => [
'name' => [
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
],
'type' => [
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
],
'status' => [
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
],
'schema_version' => [
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '-1',
],
],
]);
$this->sourceDatabase
->insert('system')
->fields([
'name',
'type',
'status',
'schema_version',
])
->values([
'name' => 'system',
'type' => 'module',
'status' => '1',
'schema_version' => '7001',
])
->execute();
}