You are here

function CasTestHelper::assertLoggedOut in CAS 7

Same name and namespace in other branches
  1. 6.3 cas.test \CasTestHelper::assertLoggedOut()

Assert that the user has been logged out.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

3 calls to CasTestHelper::assertLoggedOut()
CasLogoutRedirectionTestCase::testLogoutRedirection in ./cas.test
Test redirection on user logout.
CasSingleSignOutTestCase::testSingleSignOut in ./cas.test
CasSingleSignOutTestCase::testSingleSignOutDoubleEncode in ./cas.test

File

./cas.test, line 196
Tests for cas.module.

Class

CasTestHelper
@file Tests for cas.module.

Code

function assertLoggedOut() {
  $this
    ->drupalGet('user');
  $pass = $this
    ->assertField('name', t('Username field found.'), t('Logout'));
  $pass = $pass && $this
    ->assertField('pass', t('Password field found.'), t('Logout'));
  if ($pass) {
    $this->loggedInUser = FALSE;
  }
  return $pass;
}