public function test_login() { $this->assertEquals(true, $this->object->login('Trixie', 'test', true)); $token = $this->pixie->db->query('select')->fields('token')->table('fairies')->execute()->get('token'); $this->assertEquals(true, strlen($token) > 0); $login_token = $this->pixie->cookie->get('login_token'); $this->assertEquals(true, strlen($login_token) > 0); $this->pixie->session->remove('auth_default_password_uid'); $this->pixie->cookie->set('login_token', "Trixie:test"); $this->assertEquals(false, $this->object->check_login()); $this->pixie->cookie->set('login_token', $login_token); $this->assertEquals(true, $this->object->check_login()); $this->pixie->session->remove('auth_default_password_uid'); sleep(2); $this->assertEquals(false, $this->object->check_login()); }
public function test_login() { $this->assertEquals(true, $this->object->login('Trixie', '1234567')); $this->assertEquals(false, $this->object->login('Trixie', 'test1')); $this->assertEquals(false, $this->object->login('Trixie1', 'test1')); $this->assertEquals(true, $this->object->login('Vixie', '1234567')); $this->assertEquals(false, $this->object->login('Vixie', 'test1')); $this->assertEquals(false, $this->object->login('Vixie1', 'test1')); }
public function test_login() { $this->assertEquals(true, $this->object->login('login_test')); $this->assertEquals(false, $this->object->login('login_test2')); }