2020-03-27 14:23:44 +01:00
parent ab5d43a397
commit 1e27fcca51
3 changed files with 99 additions and 7 deletions

View File

@@ -321,6 +321,10 @@ class UserLoginTestCase extends DrupalWebTestCase {
);
}
function setUp() {
parent::setUp('user_session_test');
}
/**
* Test the global login flood control.
*/
@@ -421,6 +425,17 @@ class UserLoginTestCase extends DrupalWebTestCase {
$this->assertIdentical(_password_get_count_log2($account->pass), DRUPAL_HASH_COUNT + 1);
}
/**
* Test logging in when an anon session already exists.
*/
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);
}
/**
* Make an unsuccessful login attempt.
*