function ContextConditionNodeTaxonomyTest::test in Context 6.3
Same name and namespace in other branches
- 6 tests/context.conditions.test \ContextConditionNodeTaxonomyTest::test()
- 7.3 tests/context.conditions.test \ContextConditionNodeTaxonomyTest::test()
File
- tests/
context.conditions.test, line 169
Class
Code
function test() {
// Apples does trigger the context.
$this
->drupalPost('node/add/page', array(
'title' => 'Apples',
"taxonomy[{$this->vocab['vid']}]" => $this->terms['apples']['tid'],
), 'Save');
$this
->assertText('Active context: testcontext');
// Oranges does not trigger the context.
$this
->drupalPost('node/add/page', array(
'title' => 'Oranges',
"taxonomy[{$this->vocab['vid']}]" => $this->terms['oranges']['tid'],
), 'Save');
$this
->assertNoText('Active context: testcontext');
}