You are here

function CasTestHelper::assertLoggedIn in CAS 6.3

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

Assert that the user has logged in.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

6 calls to CasTestHelper::assertLoggedIn()
CasGatewayTestCase::testCasGatewayLoggedIn in ./cas.test
Test the CAS Gateway functionality of the user is logged in.
CasLoginBlockTestCase::testCasLoginBlock in ./cas.test
Tests the visibility and functionality of the CAS login block.
CasLoginRedirectionTestCase::testExistingUserLoginRedirection in ./cas.test
Verify login redirection for an existing user.
CasRequiredLoginTestCase::testCasExclude in ./cas.test
Test redirection prevented by cas_exclude.
CasRequiredLoginTestCase::testCasPages in ./cas.test
Test redirection forced by cas_access and cas_pages variables.

... See full list

File

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

Class

CasTestHelper
@file Tests for cas.module.

Code

function assertLoggedIn($account) {
  $pass = $this
    ->assertLink(t('Log out'), 0, t('CAS user %cas_name successfully logged in.', array(
    '%cas_name' => $account->cas_name,
  )), t('User login'));
  if ($pass) {
    $this->loggedInUser = $account;
  }
  return $pass;
}