You are here

function ContextConditionUserTest::test in Context 7.3

Same name and namespace in other branches
  1. 6.3 tests/context.conditions.test \ContextConditionUserTest::test()
  2. 6 tests/context.conditions.test \ContextConditionUserTest::test()

File

tests/context.conditions.test, line 39

Class

ContextConditionUserTest

Code

function test() {

  // User 1 triggers the context.
  $this
    ->drupalLogin($this->user1);
  $this
    ->drupalGet('node');
  $this
    ->assertText('Active context: testcontext');

  // User 2 does not.
  $this
    ->drupalLogin($this->user2);
  $this
    ->drupalGet('node');
  $this
    ->assertNoText('Active context: testcontext');
}