function MigrateSystemConfigurationTest::setUp
Same name in this branch
- 10 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::setUp()
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::setUp()
- 9 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::setUp()
- 8.9.x core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::setUp()
- 8.9.x core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::setUp()
- 11.x core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::setUp()
- 11.x core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::setUp()
Overrides MigrateDrupal7TestBase::setUp
File
-
core/
modules/ system/ tests/ src/ Kernel/ Migrate/ d7/ MigrateSystemConfigurationTest.php, line 133
Class
- MigrateSystemConfigurationTest
- Migrates various configuration objects owned by the System module.
Namespace
Drupal\Tests\system\Kernel\Migrate\d7Code
protected function setUp() : void {
parent::setUp();
// The system_maintenance migration gets both the Drupal 6 and Drupal 7
// site maintenance message. Add a row with the Drupal 6 version of the
// maintenance message to confirm that the Drupal 7 variable is selected in
// the migration.
// See https://www.drupal.org/project/drupal/issues/3096676
$this->sourceDatabase
->insert('variable')
->fields([
'name' => 'site_offline_message',
'value' => 's:16:"Drupal 6 message";',
])
->execute();
// Delete 'site_403' in order to test the migration of a non-existing error
// page link.
$this->sourceDatabase
->delete('variable')
->condition('name', 'site_403')
->execute();
// Delete 'drupal_weight_select_max ' in order to test the migration when it
// is not set.
$this->sourceDatabase
->delete('variable')
->condition('name', 'drupal_weight_select_max')
->execute();
$this->config('system.site')
->set('weight_select_max', 5)
->save();
$migrations = [
'd7_system_authorize',
'd7_system_cron',
'd7_system_date',
'd7_system_file',
'system_image_gd',
'system_image',
'system_logging',
'd7_system_mail',
'system_maintenance',
'd7_system_performance',
'system_rss',
'system_site',
];
$this->executeMigrations($migrations);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.