public function SimpleLdapUserUserOneLoginWebTestCase::testUserOneLogin in Simple LDAP 7
Same name and namespace in other branches
- 7.2 simple_ldap_user/simple_ldap_user.test \SimpleLdapUserUserOneLoginWebTestCase::testUserOneLogin()
Test User 1 authentication.
File
- simple_ldap_user/
simple_ldap_user.test, line 489 - Tests for Simple LDAP User module.
Class
Code
public function testUserOneLogin() {
// Load user-1.
$admin_user = user_load(1);
// Verify that user-1 does not exist in LDAP.
$ldap_user = new SimpleLdapUser($admin_user->name);
$this
->assertFalse($ldap_user->exists, t('User 1 does not exist in LDAP.'));
// Attempt to log in.
$this
->drupalUser1Login();
// Verify that user-1 still does not exist in LDAP.
$ldap_user = new SimpleLdapUser($admin_user->name);
$this
->assertFalse($ldap_user->exists, t('User 1 does not exist in LDAP.'));
}