@@ -41,6 +41,9 @@ final class ContactPersonTest extends TestCase
4141 use SchemaValidationTestTrait;
4242 use SerializableElementTestTrait;
4343
44+ /** @var \DOMDocument */
45+ protected DOMDocument $ ext ;
46+
4447
4548 /**
4649 */
@@ -54,12 +57,16 @@ protected function setUp(): void
5457 dirname (__FILE__ , 4 ) . '/resources/xml/md_ContactPerson.xml ' ,
5558 );
5659
60+ $ this ->ext = DOMDocumentFactory::fromString (
61+ '<some:Ext xmlns:some="urn:mace:some:metadata:1.0">SomeExtension</some:Ext> ' ,
62+ );
63+
5764 $ this ->arrayRepresentation = [
5865 'ContactType ' => 'administrative ' ,
5966 'Company ' => 'SimpleSAMLphp ' ,
6067 'GivenName ' => 'Lead ' ,
6168 'SurName ' => 'Developer ' ,
62- 'Extensions ' => null ,
69+ 'Extensions ' => [ new Chunk ( $ this -> ext -> documentElement )] ,
6370 'EmailAddress ' => ['mailto:lead.developer@example.org ' ],
6471 'TelephoneNumber ' => ['+1234567890 ' ],
6572 'attributes ' => [
@@ -82,10 +89,6 @@ protected function setUp(): void
8289 */
8390 public function testMarshalling (): void
8491 {
85- $ ext = DOMDocumentFactory::fromString (
86- '<some:Ext xmlns:some="urn:mace:some:metadata:1.0">SomeExtension</some:Ext> ' ,
87- );
88-
8992 $ attr1 = new XMLAttribute ('urn:test:something ' , 'test ' , 'attr1 ' , 'testval1 ' );
9093 $ attr2 = new XMLAttribute ('urn:test:something ' , 'test ' , 'attr2 ' , 'testval2 ' );
9194
@@ -96,7 +99,7 @@ public function testMarshalling(): void
9699 new SurName ('Doe ' ),
97100 new Extensions (
98101 [
99- new Chunk ($ ext ->documentElement ),
102+ new Chunk ($ this -> ext ->documentElement ),
100103 ],
101104 ),
102105 [new EmailAddress ('jdoe@test.company ' ), new EmailAddress ('john.doe@test.company ' )],
0 commit comments