You are here

public function AutologoutTestCase::setUp in Automated Logout 6.4

Same name and namespace in other branches
  1. 7.4 tests/autologout.test \AutologoutTestCase::setUp()

setUp() performs any pre-requisite tasks that need to happen.

Overrides DrupalWebTestCase::setUp

File

tests/autologout.test, line 32
Simpletest tests for autologout.

Class

AutologoutTestCase
Tests the autologout's features.

Code

public function setUp() {

  // Enable any modules required for the test.
  parent::setUp('autologout');

  // Create and log in our privileged user.
  $this->privileged_user = $this
    ->drupalCreateUser(array(
    'access content',
    'administer content types',
    'administer nodes',
    'access administration pages',
    'access site reports',
    'administer autologout',
    'change own logout threshold',
    'administer site configuration',
  ));
  $this
    ->drupalLogin($this->privileged_user);

  // For the purposes of the test, set the timeout periods to 10 seconds.
  variable_set('autologout_timeout', 10);
  variable_set('autologout_padding', 10);
}