You are here

function ThemeSettingsTest::testDefaultConfig in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Theme/ThemeSettingsTest.php \Drupal\system\Tests\Theme\ThemeSettingsTest::testDefaultConfig()

Tests that $theme.settings are imported and used as default theme settings.

File

core/modules/system/src/Tests/Theme/ThemeSettingsTest.php, line 49
Contains \Drupal\system\Tests\Theme\ThemeSettingsTest.

Class

ThemeSettingsTest
Tests theme settings functionality.

Namespace

Drupal\system\Tests\Theme

Code

function testDefaultConfig() {
  $name = 'test_basetheme';
  $path = $this->availableThemes[$name]
    ->getPath();
  $this
    ->assertTrue(file_exists("{$path}/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/{$name}.settings.yml"));
  $this->container
    ->get('theme_handler')
    ->install(array(
    $name,
  ));
  $this
    ->assertIdentical(theme_get_setting('base', $name), 'only');
}