You are here

function CasLoginBlockTestCase::setUp in CAS 6.3

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

Helper class for CAS tests.

Creates an administrative user and downloads phpCAS.

Overrides CasTestHelper::setUp

File

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

Class

CasLoginBlockTestCase
Tests the visibility and functionality of the CAS login block.

Code

function setUp() {
  parent::setUp();

  // Enable the CAS login block.
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer blocks',
  ));
  $this
    ->drupalLogin($admin_user);
  $edit = array(
    'user_0[region]' => '-1',
    'cas_0[region]' => 'left',
  );
  $this
    ->drupalPost('admin/build/block', $edit, t('Save blocks'));
  $this
    ->drupalLogout();
}