public function ThemekeyModulePluginsTestCase::testActivePaths in ThemeKey 7.3
File
- tests/
ThemekeyModulePluginsTestCase.test, line 44 - Implements tests for the theme switching rules.
Class
- ThemekeyModulePluginsTestCase
- @file Implements tests for the theme switching rules.
Code
public function testActivePaths() {
// Always use garland when ThemeKey is active.
$this
->addThemeKeyRule('system:dummy', '=', 'dummy', 'garland');
$this
->drupalGet('<front>');
$this
->assertTheme('garland');
// See themekey_is_active().
$this
->drupalGet('admin/structure/block/demo/bartik');
// ThemeKey should not be active.
$this
->assertTheme('bartik');
// See themekey_redirect_themekey_disabled_paths().
$_GET['q'] = 'themekey/redirect_callback';
$this
->assertFalse(themekey_is_active());
}