You are here

public function MigrateSystemConfigurationTest::testConfigurationMigration in Drupal 8

Same name in this branch
  1. 8 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateSystemConfigurationTest::testConfigurationMigration()
  2. 8 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::testConfigurationMigration()
Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateSystemConfigurationTest::testConfigurationMigration()

Tests that all expected configuration gets migrated.

File

core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php, line 151

Class

MigrateSystemConfigurationTest
Migrates various configuration objects owned by the System module.

Namespace

Drupal\Tests\system\Kernel\Migrate\d7

Code

public function testConfigurationMigration() {
  foreach ($this->expectedConfig as $config_id => $values) {
    if ($config_id == 'system.mail') {
      $actual = \Drupal::config($config_id)
        ->getRawData();
    }
    else {
      $actual = \Drupal::config($config_id)
        ->get();
    }
    unset($actual['_core']);
    $this
      ->assertSame($actual, $values, $config_id . ' matches expected values.');
  }
}