@@ -51,6 +51,9 @@ final class SubjectTest extends TestCase
5151 use SerializableElementTestTrait;
5252
5353
54+ /** @var \Dom\XMLDocument */
55+ private static Dom \XMLDocument $ xmlRepresentationBaseId ;
56+
5457 /** @var \Dom\XMLDocument */
5558 private static Dom \XMLDocument $ subject ;
5659
@@ -72,6 +75,10 @@ public function setup(): void
7275 dirname (__FILE__ , 4 ) . '/resources/xml/saml_Subject.xml ' ,
7376 );
7477
78+ self ::$ xmlRepresentationBaseId = DOMDocumentFactory::fromFile (
79+ dirname (__FILE__ , 4 ) . '/resources/xml/saml_Subject_BaseID.xml ' ,
80+ );
81+
7582 self ::$ subject = DOMDocumentFactory::fromString (
7683 <<<XML
7784<saml:Subject xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"></saml:Subject>
@@ -245,7 +252,7 @@ public function testMarshallingBaseID(): void
245252 new SubjectConfirmation (
246253 SAMLAnyURIValue::fromString ('urn:oasis:names:tc:SAML:2.0:cm:bearer ' ),
247254 new NameID (
248- value: SAMLStringValue::fromString ('SomeNameIDValue ' ),
255+ value: SAMLStringValue::fromString ('SomeOtherNameIDValue ' ),
249256 SPNameQualifier: SAMLStringValue::fromString (
250257 'https://sp.example.org/authentication/sp/metadata ' ,
251258 ),
@@ -267,7 +274,7 @@ public function testMarshallingBaseID(): void
267274 SubjectConfirmation::fromXML (self ::$ subjectConfirmation ->documentElement )->toXML ($ document ->documentElement );
268275
269276 $ this ->assertEquals (
270- self ::$ xmlRepresentation ->saveXML (self ::$ xmlRepresentation ->documentElement ),
277+ self ::$ xmlRepresentationBaseId ->saveXML (self ::$ xmlRepresentationBaseId ->documentElement ),
271278 strval ($ subject ),
272279 );
273280 }
0 commit comments