File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 6969 "phpstan/extension-installer" : true ,
7070 "simplesamlphp/composer-xmlprovider-installer" : true
7171 }
72+ },
73+ "scripts" : {
74+ "pre-commit" : [
75+ " vendor/bin/phpcs -p" ,
76+ " vendor/bin/composer-require-checker check --config-file=tools/composer-require-checker.json composer.json" ,
77+ " vendor/bin/phpstan analyze -c phpstan.neon" ,
78+ " vendor/bin/phpstan analyze -c phpstan-dev.neon" ,
79+ " vendor/bin/composer-unused" ,
80+ " vendor/bin/phpunit --no-coverage --testdox"
81+ ]
7282 }
7383}
Original file line number Diff line number Diff line change @@ -494,10 +494,17 @@ public function testUnmarshalling(): void
494494 $ entityDescriptor ->getAdditionalMetadataLocation ()[1 ],
495495 );
496496
497- $ this ->assertEquals (
497+ // Normalize both documents before comparing
498+ $ expectedDoc = DOMDocumentFactory::fromString (
498499 $ xmlRepresentation ->saveXML ($ xmlRepresentation ->documentElement ),
499- strval ($ entityDescriptor ),
500500 );
501+ $ expected = DOMDocumentFactory::normalizeDocument ($ expectedDoc );
502+
503+ $ actualDoc = DOMDocumentFactory::fromString ((string ) $ entityDescriptor );
504+ $ actual = DOMDocumentFactory::normalizeDocument ($ actualDoc );
505+
506+ // Compare normalized XML
507+ $ this ->assertXmlStringEqualsXmlString ($ expected ->saveXML (), $ actual ->saveXML ());
501508 }
502509
503510
Original file line number Diff line number Diff line change @@ -266,7 +266,12 @@ public function testMarshallingBaseID(): void
266266 AbstractBaseID::fromXML (self ::$ baseId ->documentElement )->toXML ($ document ->documentElement );
267267 SubjectConfirmation::fromXML (self ::$ subjectConfirmation ->documentElement )->toXML ($ document ->documentElement );
268268
269- $ this ->assertXmlStringEqualsXmlString ($ document ->saveXML (), strval ($ subject ));
269+ // Normalize both documents before comparing
270+ $ expected = DOMDocumentFactory::normalizeDocument ($ document );
271+ $ actualDoc = DOMDocumentFactory::fromString ((string ) $ subject );
272+ $ actual = DOMDocumentFactory::normalizeDocument ($ actualDoc );
273+
274+ $ this ->assertXmlStringEqualsXmlString ($ expected ->saveXML (), $ actual ->saveXML ());
270275 }
271276
272277
You can’t perform that action at this time.
0 commit comments