public function ThemekeyRuleChainTestCase::testChildProperty in ThemeKey 7.3
File
- tests/
ThemekeyRuleChainTestCase.test, line 19 - Implements tests for the theme switching rules.
Class
- ThemekeyRuleChainTestCase
- @file Implements tests for the theme switching rules.
Code
public function testChildProperty() {
$node1 = $this
->drupalCreateNode(array(
'title' => 'Node title test',
));
$node2 = $this
->drupalCreateNode();
$this
->drupalGet('node/' . $node1->nid);
$this
->assertTheme('bartik');
$this
->addThemeKeyRule('node:title', '=', 'Node title test', 'garland');
$this
->drupalGet('node/' . $node1->nid);
$this
->assertTheme('garland');
$this
->addThemeKeyRule('user:uid', '=', '0', 'seven', '1', '', $this->last_rule_id);
$this
->drupalGet('node/' . $node1->nid);
$this
->assertTheme('bartik');
$this
->drupalLogout();
$this
->drupalGet('node/' . $node1->nid);
$this
->assertTheme('seven');
$this
->drupalGet('node/' . $node2->nid);
$this
->assertTheme('bartik');
}