You are here

function ThemeTestCase::testThemeGetSetting in Drupal 7

Test the theme_get_setting() function.

File

modules/simpletest/tests/theme.test, line 152
Tests for the theme API.

Class

ThemeTestCase
Unit tests for the Theme API.

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.');
}