function CasTestHelper::assertToken in CAS 6.3
Same name and namespace in other branches
- 7 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.
File
- ./
cas.test, line 224 - 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');
}