You are here

function LdapAuthorizationOg1Tests::UIGroupMembershipTest in Lightweight Directory Access Protocol (LDAP) 8.2

1 call to LdapAuthorizationOg1Tests::UIGroupMembershipTest()
LdapAuthorizationOg1Tests::testLogons in ldap_authorization/tests/Og1Tests.test
authorization configuration flags tests clumped together

File

ldap_authorization/tests/Og1Tests.test, line 118

Class

LdapAuthorizationOg1Tests

Code

function UIGroupMembershipTest($user, $group_node, $test_id = NULL, $assert_true = TRUE) {
  $this
    ->drupalGet('user/' . $user->uid);
  if ($assert_true) {
    $this
      ->assertText($group_node->title, 'User view UI shows group (' . $group_node->title . ') membership listed', $test_id);
  }
  else {
    $this
      ->assertNoText($group_node->title, 'User view UI does not show group (' . $group_node->title . ') membership listed', $test_id);
  }
  $this
    ->drupalGet('node/' . $group_node->nid);
  if ($assert_true) {
    $this
      ->assertText($user->name, 'Group view UI shows user name (' . $user->name . ') in group membership list', $test_id);
  }
  else {
    $this
      ->assertText('Request group membership', 'Group view UI show Request Group Membership form in group membership list', $test_id);
  }
}