You are here

public function ThemekeyWebTestCase::simplePropertyTest in ThemeKey 7.3

Same name and namespace in other branches
  1. 7 tests/themekey.test \ThemekeyWebTestCase::simplePropertyTest()
  2. 7.2 tests/themekey.test \ThemekeyWebTestCase::simplePropertyTest()
16 calls to ThemekeyWebTestCase::simplePropertyTest()
ThemekeyDrupalPropertiesTestCase::testPropertyDrupalIsFrontPage in tests/ThemekeyDrupalPropertiesTestCase.test
ThemekeyModulePluginsTestCase::testHookThemekeyGlobal in tests/ThemekeyModulePluginsTestCase.test
ThemekeyNodePropertiesTestCase::testPropertyNodeChanged in tests/ThemekeyNodePropertiesTestCase.test
ThemekeyNodePropertiesTestCase::testPropertyNodeCreated in tests/ThemekeyNodePropertiesTestCase.test
ThemekeyNodePropertiesTestCase::testPropertyNodeLanguage in tests/ThemekeyNodePropertiesTestCase.test

... See full list

File

tests/themekey.test, line 41
Implements tests for the theme switching rules.

Class

ThemekeyWebTestCase
@file Implements tests for the theme switching rules.

Code

public function simplePropertyTest($property, $operator, $value, $url = array()) {
  debug($property . $operator . $value, 'Testing Rule');
  $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($property, $operator, $value, 'garland');

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

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