function ThemeTest::testThemeGetSetting

Test the theme_get_setting() function.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php, line 164
Definition of Drupal\system\Tests\Theme\ThemeTest.

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\system\Tests\Theme

Code

function testThemeGetSetting() {
  $GLOBALS['theme_key'] = 'test_theme';
  $this
    ->assertIdentical(theme_get_setting('theme_test_setting'), 'default value', 'theme_get_setting() uses the default theme automatically.');
  $this
    ->assertNotEqual(theme_get_setting('subtheme_override', 'test_basetheme'), theme_get_setting('subtheme_override', 'test_subtheme'), 'Base theme\'s default settings values can be overridden by subtheme.');
  $this
    ->assertIdentical(theme_get_setting('basetheme_only', 'test_subtheme'), 'base theme value', 'Base theme\'s default settings values are inherited by subtheme.');
}