Beispiel #1
0
 public function testOnlyRunsOnIdentifyEvent()
 {
     $id = new GenericIdentity('superman');
     $id->setCredential('tower');
     $e = new Authenticate($id);
     $i = new Callback('ident1', function (Event $e) {
         throw new \Exception("should not run");
     });
     self::assertNull($i->discern($e));
 }
Beispiel #2
0
 private function buildAuthenticateEvent()
 {
     $id = new GenericIdentity('test');
     $id->setCredential('test');
     return new Authenticate($id);
 }