MigrateGlobalThemeSettingsTest.php

Same filename in other branches
  1. 9 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
  2. 8.9.x core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php
  3. 11.x core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php

Namespace

Drupal\Tests\system\Kernel\Migrate\d7

File

core/modules/system/tests/src/Kernel/Migrate/d7/MigrateGlobalThemeSettingsTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\system\Kernel\Migrate\d7;

use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;

/**
 * Tests migration of global theme settings variables to configuration.
 *
 * @group system
 */
class MigrateGlobalThemeSettingsTest extends MigrateDrupal7TestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'system',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->executeMigration('d7_global_theme_settings');
    }
    
    /**
     * Tests migration of global theme settings to configuration.
     */
    public function testMigrateThemeSettings() : void {
        $config = $this->config('system.theme.global');
        $this->assertSame('image/png', $config->get('favicon.mimetype'));
        $this->assertSame('public://somefavicon.png', $config->get('favicon.path'));
        $this->assertFalse($config->get('favicon.use_default'));
        $this->assertFalse($config->get('features.comment_user_picture'));
        $this->assertFalse($config->get('features.comment_user_verification'));
        $this->assertFalse($config->get('features.favicon'));
        $this->assertFalse($config->get('features.node_user_picture'));
        $this->assertFalse($config->get('features.logo'));
        $this->assertTrue($config->get('features.name'));
        $this->assertFalse($config->get('features.slogan'));
        $this->assertSame('public://customlogo.png', $config->get('logo.path'));
        $this->assertTrue($config->get('logo.use_default'));
    }

}

Classes

Title Deprecated Summary
MigrateGlobalThemeSettingsTest Tests migration of global theme settings variables to configuration.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.