You are here

function CasGatewayTestCase::testCasGatewayLoggedOut in CAS 6.3

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

Test the CAS Gateway functionality of the user is not logged in.

File

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

Class

CasGatewayTestCase
Test case for CAS gateway feature.

Code

function testCasGatewayLoggedOut() {
  $this
    ->drupalGet('');
  $this
    ->assertTrue($this->redirect_count > 1, 'Polled CAS server on first request.');
  $this
    ->drupalGet('');
  $this
    ->assertEqual($this->redirect_count, 0, 'Did not poll CAS server on second request.');
  $this
    ->drupalGet('node');
  $this
    ->assertEqual($this->redirect_count, 0, 'Did not poll CAS server on third request.');
}