| 7 menu.test | MenuRouterTestCase::testThemeCallbackOptionalTheme() |
| 8 menu.test | MenuRouterTestCase::testThemeCallbackOptionalTheme() |
Test the theme callback when it is set to use an optional theme.
File
- modules/
simpletest/ tests/ menu.test, line 257 - Provides SimpleTests for menu.inc.
Code
function testThemeCallbackOptionalTheme() {
// Request a theme that is not enabled.
$this->drupalGet('menu-test/theme-callback/use-stark-theme');
$this->assertText('Custom theme: NONE. Actual theme: bartik.', t('The theme callback system falls back on the default theme when a theme that is not enabled is requested.'));
$this->assertRaw('bartik/css/style.css', t("The default theme's CSS appears on the page."));
// Now enable the theme and request it again.
theme_enable(array('stark'));
$this->drupalGet('menu-test/theme-callback/use-stark-theme');
$this->assertText('Custom theme: stark. Actual theme: stark.', t('The theme callback system uses an optional theme once it has been enabled.'));
$this->assertRaw('stark/layout.css', t("The optional theme's CSS appears on the page."));
}
Login or register to post comments