function ThemeTestCase::testThemeGetSetting

Test the theme_get_setting() function.

File

modules/simpletest/tests/theme.test, line 152

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

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