示例#1
0
 public function testAuthenticateInvalidUser()
 {
     $user = \BaseUser::findFirst(array(array('email' => '*****@*****.**')));
     $auth = DI::getDefault()->get('authNoCredential');
     $this->assertEmpty($user);
     $this->assertNotInstanceOf('\\Vegas\\Security\\Authentication\\GenericUserInterface', $user);
     $this->setExpectedException('\\PHPUnit_Framework_Error');
     //Argument 1 passed to Vegas\Security\Authentication::authenticate()
     //must implement interface Vegas\Security\Authentication\GenericUserInterface, boolean given
     $auth->authenticate($user, null);
 }