You are here

public function ThemekeyWebTestCase::simplePropertyTest in ThemeKey 7.2

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

... See full list

File

tests/themekey.test, line 29
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');
}