You are here

protected function MigrateSystemConfigurationTest::setUp in Drupal 9

Same name in this branch
  1. 9 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::setUp()
  2. 9 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::setUp()
Same name and namespace in other branches
  1. 8 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 121

Class

MigrateSystemConfigurationTest
Migrates various configuration objects owned by the System module.

Namespace

Drupal\Tests\system\Kernel\Migrate\d7

Code

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();
  $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);
}