You are here

function ThemeSettingsTest::testNoDefaultConfig 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::testNoDefaultConfig()

Tests that the $theme.settings default config file is optional.

File

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

Class

ThemeSettingsTest
Tests theme settings functionality.

Namespace

Drupal\system\Tests\Theme

Code

function testNoDefaultConfig() {
  $name = 'stark';
  $path = $this->availableThemes[$name]
    ->getPath();
  $this
    ->assertFalse(file_exists("{$path}/" . InstallStorage::CONFIG_INSTALL_DIRECTORY . "/{$name}.settings.yml"));
  $this->container
    ->get('theme_handler')
    ->install(array(
    $name,
  ));
  $this
    ->assertNotNull(theme_get_setting('features.favicon', $name));
}