1 changed files with 3 additions and 2 deletions
@ -100,7 +100,6 @@ class LoginTest extends CIDatabaseTestCase
|
||||
$session = $this->getInstance(); |
||||
$config = new AauthConfig(); |
||||
$config->loginUseUsername = true; |
||||
print_r($config); |
||||
$this->library = new Aauth($config, $session); |
||||
$this->assertTrue($this->library->login('admin', 'password123456')); |
||||
} |
||||
@ -120,9 +119,10 @@ class LoginTest extends CIDatabaseTestCase
|
||||
$session = $this->getInstance(); |
||||
$config = new AauthConfig(); |
||||
$config->loginUseUsername = true; |
||||
$this->library = new Aauth($config, $session); |
||||
$this->assertFalse($this->library->login('admina', 'password')); |
||||
$this->assertEquals(lang('Aauth.notFoundUser'), $this->library->getErrorsArray()[0]); |
||||
$this->library = new Aauth($config, $session); |
||||
$config->loginUseUsername = false; |
||||
} |
||||
|
||||
public function testLoginFalseNotVerified() |
||||
@ -165,6 +165,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->assertFalse($this->library->login('[email protected]', 'password123456')); |
||||
$this->assertEquals(lang('Aauth.loginAttemptsExceeded'), $this->library->getErrorsArray()[0]); |
||||
} |
||||
|
Loading…
Reference in new issue