1 changed files with 11 additions and 1 deletions
@ -61,11 +61,21 @@ class LoginTest extends CIDatabaseTestCase |
|||||||
|
|
||||||
//-------------------------------------------------------------------- |
//-------------------------------------------------------------------- |
||||||
|
|
||||||
|
public function testLoginEmailTrue() |
||||||
|
{ |
||||||
|
$session = $this->getInstance(); |
||||||
|
$this->library = new Aauth(NULL, $session); |
||||||
|
$this->assertTrue($this->library->login('[email protected]', 'password123456')); |
||||||
|
print_r($_SESSION); |
||||||
|
} |
||||||
|
|
||||||
public function testIsLoggedIn() |
public function testIsLoggedIn() |
||||||
{ |
{ |
||||||
$session = $this->getInstance(); |
$session = $this->getInstance(); |
||||||
$this->library = new Aauth(NULL, $session); |
$this->library = new Aauth(NULL, $session); |
||||||
$this->assertTrue($this->library->login('[email protected]', 'password123456')); |
$session->set('user', [ |
||||||
|
'loggedIn' => true, |
||||||
|
]); |
||||||
$this->assertTrue($this->library->isLoggedIn()); |
$this->assertTrue($this->library->isLoggedIn()); |
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue