You are here

function ContextConditionNagateUserTest::test in Context 7.3

File

tests/context.conditions.test, line 77

Class

ContextConditionNagateUserTest

Code

function test() {

  // User 1 does not trigger the context.
  $this
    ->drupalLogin($this->user1);
  $this
    ->drupalGet('node');
  $this
    ->assertNoText('Active context: testcontext');

  // Anonymous triggers the context.
  $this
    ->drupalLogout();
  $this
    ->drupalGet('');
  $this
    ->assertText('Active context: testcontext');
}