コード例 #1
0
 public function testGetIdpList()
 {
     $result = $this->ServiceRegistry->getIdpList();
     $this->assertEquals(2, count($result));
     $this->assertEquals("Ivo's IDP", $result["http://ivotestidp.local"]["name:en"]);
     $result = $this->ServiceRegistry->getIdpList(array(), "someSP");
     $this->assertEquals(1, count($result), "Idplist not correctly filtered by SP");
     $result = $this->ServiceRegistry->getIdpList(array(), NULL);
     $this->assertEquals(2, count($result), "Idplist not correctly ignoring NULL sp");
 }
コード例 #2
0
 protected function _getRemoteIdPsMetadata()
 {
     $metadata = array();
     $idPs = $this->_serviceRegistry->getIdpList();
     foreach ($idPs as $idPEntityId => $idP) {
         try {
             $metadata[$idPEntityId] = self::convertServiceRegistryEntityToCortoEntity($idP);
         } catch (Exception $e) {
             // Whoa, something went wrong trying to convert the SR entity to a Corto entity
             // We can't use this entity, but we can continue after we've reported
             // this serious error
             $application = EngineBlock_ApplicationSingleton::getInstance();
             $application->reportError($e);
             continue;
         }
     }
     return $metadata;
 }