1 changed files with 3 additions and 1 deletions
@ -110,7 +110,7 @@ class LoginTest extends CIDatabaseTestCase |
|||||||
$config = new AauthConfig(); |
$config = new AauthConfig(); |
||||||
$config->loginUseUsername = true; |
$config->loginUseUsername = true; |
||||||
$this->library = new Aauth($config, $session); |
$this->library = new Aauth($config, $session); |
||||||
$this->assertFalse($this->library->login('admin', 'password')); |
$this->assertFalse($this->library->login('admin', 'passwor')); |
||||||
$this->assertEquals(lang('Aauth.loginFailedUsername'), $this->library->getErrorsArray()[0]); |
$this->assertEquals(lang('Aauth.loginFailedUsername'), $this->library->getErrorsArray()[0]); |
||||||
} |
} |
||||||
|
|
||||||
@ -166,6 +166,7 @@ class LoginTest extends CIDatabaseTestCase |
|||||||
$this->library->login('[email protected]', 'password123456'); |
$this->library->login('[email protected]', 'password123456'); |
||||||
$this->library->login('[email protected]', 'password123456'); |
$this->library->login('[email protected]', 'password123456'); |
||||||
$this->library->login('[email protected]', 'password123456'); |
$this->library->login('[email protected]', 'password123456'); |
||||||
|
$this->library->login('[email protected]', 'password123456'); |
||||||
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
$this->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||||
$this->assertEquals(lang('Aauth.loginAttemptsExceeded'), $this->library->getErrorsArray()[0]); |
$this->assertEquals(lang('Aauth.loginAttemptsExceeded'), $this->library->getErrorsArray()[0]); |
||||||
} |
} |
||||||
@ -189,6 +190,7 @@ class LoginTest extends CIDatabaseTestCase |
|||||||
]); |
]); |
||||||
$this->assertTrue($this->library->isLoggedIn()); |
$this->assertTrue($this->library->isLoggedIn()); |
||||||
$this->library->logout(); |
$this->library->logout(); |
||||||
|
$this->library = new Aauth(null, $session); |
||||||
$this->assertFalse($this->library->isLoggedIn()); |
$this->assertFalse($this->library->isLoggedIn()); |
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue