コード例 #1
0
ファイル: CallbackTest.php プロジェクト: dlundgren/watchtower
 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));
 }
コード例 #2
0
ファイル: LdapTest.php プロジェクト: dlundgren/watchtower
 private function buildAuthenticateEvent()
 {
     $id = new GenericIdentity('test');
     $id->setCredential('test');
     return new Authenticate($id);
 }