function UserLoginTestCase::testLoginWithAnonSession

Test logging in when an anon session already exists.

File

modules/user/user.test, line 443

Class

UserLoginTestCase
Functional tests for user logins, including rate limiting of login attempts.

Code

function testLoginWithAnonSession() {
    // Visit the callback to generate a session for this anon user.
    $this->drupalGet('user_session_test_anon_session');
    // Now login.
    $account = $this->drupalCreateUser(array());
    $this->drupalLogin($account);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.