コード例 #1
0
 /**
  * @param EntityId $entityId
  * @return ContactPersonList
  */
 public function findAllForIdp(EntityId $entityId)
 {
     $identityProviderJson = $this->apiClient->read('metadata/idp?entity-id=%s', [$entityId->getEntityId()]);
     return ContactPersonListFactory::createListFromMetadata($identityProviderJson);
 }
コード例 #2
0
 /**
  * @test
  * @group ContactPerson
  */
 public function contact_person_list_with_contact_person_without_email_address_can_be_deserialized()
 {
     $given = ['contact_persons' => [['contact_type' => 'technical', 'email_address' => '*****@*****.**'], ['contact_type' => 'support']]];
     $expectedContactPersonList = new ContactPersonList([new ContactPerson(new ContactType(ContactType::TYPE_TECHNICAL), new ContactEmailAddress('*****@*****.**')), new ContactPerson(new ContactType(ContactType::TYPE_SUPPORT), null)]);
     $this->assertEquals($expectedContactPersonList, ContactPersonListFactory::createListFromMetadata($given));
 }