| 7 menu.test | MenuRouterTestCase::testThemeCallbackHookCustomTheme() |
| 8 menu.test | MenuRouterTestCase::testThemeCallbackHookCustomTheme() |
Test that the theme callback wins out over hook_custom_theme().
File
- modules/
simpletest/ tests/ menu.test, line 307 - Provides SimpleTests for menu.inc.
Code
function testThemeCallbackHookCustomTheme() {
// Trigger hook_custom_theme() to dynamically request the Stark theme for
// the requested page.
variable_set('menu_test_hook_custom_theme_name', 'stark');
theme_enable(array('stark'));
// The menu "theme callback" should take precedence over a value set in
// hook_custom_theme().
$this->drupalGet('menu-test/theme-callback/use-admin-theme');
$this->assertText('Custom theme: seven. Actual theme: seven.', t('The result of hook_custom_theme() does not override what was set in a theme callback.'));
$this->assertRaw('seven/style.css', t("The Seven theme's CSS appears on the page."));
}
Login or register to post comments