You are here

private function ForumAccessTestCase::testForumAccessLogin in Forum Access 6

Wrapper function for drupalLogin

1 call to ForumAccessTestCase::testForumAccessLogin()
ForumAccessTestCase::testForumAccessRun in ./forum_access.test
The main function which is used to start testing a specific forum configuration.

File

./forum_access.test, line 1128
Test file for forum_access.module.

Class

ForumAccessTestCase
This is the base class for forum access testing.

Code

private function testForumAccessLogin($name = '') {
  if (array_key_exists($name, $this->testForumAccessUsers)) {
    $this
      ->drupalLogin($this->testForumAccessUsers[$name]);
    $this->testForumAccessCurrentUsername = $name;
  }
  elseif ($name == 'admin_user') {
    $this
      ->drupalLogin($this->testForumAccessAdminUser);
    $this->testForumAccessCurrentUsername = 'admin_user';
  }
  else {
    $this
      ->drupalLogout();
    $this->testForumAccessCurrentUsername = '';
  }
}