You are here

public function ThemekeyModulePluginsTestCase::testHookThemekeyCustomThemeAlter in ThemeKey 7.3

File

tests/ThemekeyModulePluginsTestCase.test, line 26
Implements tests for the theme switching rules.

Class

ThemekeyModulePluginsTestCase
@file Implements tests for the theme switching rules.

Code

public function testHookThemekeyCustomThemeAlter() {
  $url = array(
    'path' => '<front>',
    'options' => array(),
  );

  // load page
  $this
    ->drupalGet($url['path'], $url['options']);

  // theme is bartik
  $this
    ->assertTheme('bartik');

  // create ThemeKey Rule
  $this
    ->addThemeKeyRule('themekey_simpletest:custom_theme_alter_test', '=', '1', 'garland');

  // load page
  $this
    ->drupalGet($url['path'], $url['options']);

  // theme was garland but is altered to seven by themekey_simpletest_themekey_custom_theme_alter()
  $this
    ->assertTheme('seven');
}