You are here

function CasTestHelper::assertToken in CAS 7

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

Assert the value of the token.

Parameters

$token: A token to evaluate for the current CAS user.

$value: The expected value after the token is evaluated.

$message: The message to display along with the assertion.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

1 call to CasTestHelper::assertToken()
CasUserTestCase::testNameToken in ./cas.test

File

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

Class

CasTestHelper
@file Tests for cas.module.

Code

function assertToken($token, $value, $message = '') {
  $options = array(
    'query' => array(
      'token' => $token,
      'name' => $this->loggedInUser->cas_name,
    ),
  );
  $path = 'cas_test/token';
  $out = $this
    ->drupalGet($path, $options);
  return $this
    ->assertEqual($out, $value, $message, 'Token');
}