예제 #1
0
 public function test_has_role()
 {
     $this->assertEquals(false, $this->object->has_role('pixie'));
     $this->object->set_user($this->pixie->orm->get('fairy')->find(), 'password');
     $this->assertEquals(true, $this->object->has_role('pixie'));
     $this->assertEquals(false, $this->object->has_role('pixie1'));
 }
예제 #2
0
 public function test_logout_url()
 {
     $this->object->set_user($this->pixie->orm->get('fairy')->find(), 123);
     $redirect_url = 'http://google.com/';
     $url = $this->object->logout_url($redirect_url);
     $this->assertEquals('https://facebook.com/logout.php?access_token=123&next=' . urlencode($redirect_url), $url);
 }
예제 #3
0
 public function test_logout()
 {
     $this->object->set_user($this->pixie->orm->get('fairy')->find());
     $this->object->logout();
     $this->assertEquals(true, empty($this->session_array['auth_default_password_uid']));
 }