You are here

public function UserProtectProtectionWebTest::setUp in User protect 7

Overrides DrupalWebTestCase::setUp().

Overrides UserProtectWebTestBase::setUp

File

tests/UserProtectProtectionWebTest.test, line 38
Contains UserProtectProtectionWebTest.

Class

UserProtectProtectionWebTest
Tests creating, editing and deleting protection rules through the UI.

Code

public function setUp($modules = array()) {
  parent::setUp($modules);

  // Set administrator bypass defaults to no bypassing at all.
  variable_set('userprotect_administrator_bypass_defaults', array(
    'up_name' => 0,
    'up_mail' => 0,
    'up_pass' => 0,
    'up_status' => 0,
    'up_roles' => 0,
    'up_openid' => 0,
    'up_cancel' => 0,
    'up_edit' => 0,
  ));
  $this->account = $this
    ->drupalCreateUser(array(
    'administer users',
    'administer permissions',
  ));
  $this
    ->drupalLogin($this->account);
}