You are here

public function AutologoutTestCase::setUp in Automated Logout 7.4

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

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

Overrides DrupalWebTestCase::setUp

File

tests/autologout.test, line 208
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 site configuration',
    'access site reports',
    'access administration pages',
    'bypass node access',
    'administer content types',
    'administer nodes',
    'administer autologout',
    'change own logout threshold',
  ));
  $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);
}