You are here

public function MigrateThemeSettingsTest::testMigrateThemeSettings in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateThemeSettingsTest::testMigrateThemeSettings()

Tests migration of theme settings to variables to configuration.

File

core/modules/system/tests/src/Kernel/Migrate/d7/MigrateThemeSettingsTest.php, line 28

Class

MigrateThemeSettingsTest
Tests migration of Theme settings variables to configuration.

Namespace

Drupal\Tests\system\Kernel\Migrate\d7

Code

public function testMigrateThemeSettings() {
  $config = $this
    ->config('bartik.settings');
  $this
    ->assertSame('', $config
    ->get('favicon.path'));
  $this
    ->assertTrue($config
    ->get('favicon.use_default'));
  $this
    ->assertTrue($config
    ->get('features.comment_user_picture'));
  $this
    ->assertTrue($config
    ->get('features.comment_user_verification'));
  $this
    ->assertTrue($config
    ->get('features.favicon'));
  $this
    ->assertTrue($config
    ->get('features.node_user_picture'));
  $this
    ->assertNull($config
    ->get('features.logo'));
  $this
    ->assertTrue($config
    ->get('features.name'));
  $this
    ->assertTrue($config
    ->get('features.slogan'));
  $this
    ->assertSame('public://gnu.png', $config
    ->get('logo.path'));
  $this
    ->assertFalse($config
    ->get('logo.use_default'));
  $config = $this
    ->config('seven.settings');
  $this
    ->assertSame('', $config
    ->get('favicon.path'));
  $this
    ->assertTrue($config
    ->get('favicon.use_default'));
  $this
    ->assertFalse($config
    ->get('features.comment_user_picture'));
  $this
    ->assertTrue($config
    ->get('features.comment_user_verification'));
  $this
    ->assertTrue($config
    ->get('features.favicon'));
  $this
    ->assertTrue($config
    ->get('features.node_user_picture'));
  $this
    ->assertNull($config
    ->get('features.logo'));
  $this
    ->assertTrue($config
    ->get('features.name'));
  $this
    ->assertTrue($config
    ->get('features.slogan'));
  $this
    ->assertSame('', $config
    ->get('logo.path'));
  $this
    ->assertTrue($config
    ->get('logo.use_default'));
}