From ca255b538e1d590f1bcc6368b3b70c370dc6b71d Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 25 Dec 2023 12:44:49 +0100 Subject: [PATCH] Implement generic version of testUnmarshalling --- composer.json | 2 +- tests/SAML2/XML/alg/DigestMethodTest.php | 13 -------- tests/SAML2/XML/alg/SigningMethodTest.php | 13 -------- tests/SAML2/XML/ecp/RelayStateTest.php | 13 -------- .../XML/ecp/RequestAuthenticatedTest.php | 13 -------- tests/SAML2/XML/ecp/RequestTest.php | 13 -------- tests/SAML2/XML/ecp/ResponseTest.php | 13 -------- .../SAML2/XML/ecp/SubjectConfirmationTest.php | 13 -------- tests/SAML2/XML/emd/RepublishRequestTest.php | 14 --------- tests/SAML2/XML/emd/RepublishTargetTest.php | 11 ------- .../XML/idpdisc/DiscoveryResponseTest.php | 14 --------- tests/SAML2/XML/init/RequestInitiatorTest.php | 14 --------- .../XML/md/AdditionalMetadataLocationTest.php | 14 --------- tests/SAML2/XML/md/AffiliateMemberTest.php | 17 ----------- .../XML/md/AffiliationDescriptorTest.php | 14 --------- .../XML/md/ArtifactResolutionServiceTest.php | 14 --------- .../XML/md/AssertionConsumerServiceTest.php | 17 ----------- .../md/AttributeAuthorityDescriptorTest.php | 14 --------- .../XML/md/AttributeConsumingServiceTest.php | 14 --------- tests/SAML2/XML/md/AttributeProfileTest.php | 16 ---------- .../XML/md/AuthnAuthorityDescriptorTest.php | 14 --------- tests/SAML2/XML/md/CompanyTest.php | 17 ----------- tests/SAML2/XML/md/ContactPersonTest.php | 14 --------- tests/SAML2/XML/md/EmailAddressTest.php | 14 --------- tests/SAML2/XML/md/EncryptionMethodTest.php | 14 --------- tests/SAML2/XML/md/EndpointTypeTest.php | 14 --------- tests/SAML2/XML/md/EntitiesDescriptorTest.php | 14 --------- tests/SAML2/XML/md/EntityDescriptorTest.php | 1 + tests/SAML2/XML/md/ExtensionsTest.php | 1 + tests/SAML2/XML/md/GivenNameTest.php | 17 ----------- tests/SAML2/XML/md/IDPSSODescriptorTest.php | 14 --------- tests/SAML2/XML/md/KeyDescriptorTest.php | 14 --------- tests/SAML2/XML/md/NameIDFormatTest.php | 16 ---------- .../SAML2/XML/md/NameIDMappingServiceTest.php | 14 --------- .../XML/md/OrganizationDisplayNameTest.php | 17 ----------- tests/SAML2/XML/md/OrganizationNameTest.php | 17 ----------- tests/SAML2/XML/md/OrganizationTest.php | 17 ----------- tests/SAML2/XML/md/OrganizationURLTest.php | 14 --------- tests/SAML2/XML/md/PDPDescriptorTest.php | 14 --------- tests/SAML2/XML/md/RequestedAttributeTest.php | 14 --------- tests/SAML2/XML/md/RoleDescriptorTest.php | 1 + tests/SAML2/XML/md/SPSSODescriptorTest.php | 14 --------- tests/SAML2/XML/md/ServiceDescriptionTest.php | 17 ----------- tests/SAML2/XML/md/ServiceNameTest.php | 14 --------- .../SAML2/XML/md/SingleSignOnServiceTest.php | 14 --------- tests/SAML2/XML/md/SurNameTest.php | 17 ----------- tests/SAML2/XML/md/TelephoneNumberTest.php | 17 ----------- .../SAML2/XML/mdattr/EntityAttributesTest.php | 13 -------- tests/SAML2/XML/mdrpi/PublicationInfoTest.php | 13 -------- tests/SAML2/XML/mdrpi/PublicationPathTest.php | 12 -------- tests/SAML2/XML/mdrpi/PublicationTest.php | 13 -------- .../SAML2/XML/mdrpi/RegistrationInfoTest.php | 13 -------- .../XML/mdrpi/RegistrationPolicyTest.php | 14 --------- tests/SAML2/XML/mdrpi/UsagePolicyTest.php | 14 --------- tests/SAML2/XML/mdui/DescriptionTest.php | 17 ----------- tests/SAML2/XML/mdui/DiscoHintsTest.php | 14 --------- tests/SAML2/XML/mdui/DisplayNameTest.php | 17 ----------- tests/SAML2/XML/mdui/DomainHintTest.php | 14 --------- tests/SAML2/XML/mdui/GeolocationHintTest.php | 17 ----------- tests/SAML2/XML/mdui/IPHintTest.php | 17 ----------- tests/SAML2/XML/mdui/InformationURLTest.php | 14 --------- tests/SAML2/XML/mdui/KeywordsTest.php | 14 --------- tests/SAML2/XML/mdui/LogoTest.php | 14 --------- .../XML/mdui/PrivacyStatementURLTest.php | 14 --------- tests/SAML2/XML/mdui/UIInfoTest.php | 14 --------- tests/SAML2/XML/saml/ActionTest.php | 16 ---------- tests/SAML2/XML/saml/AdviceTest.php | 13 -------- tests/SAML2/XML/saml/AssertionIDRefTest.php | 13 -------- tests/SAML2/XML/saml/AssertionTest.php | 1 + tests/SAML2/XML/saml/AssertionURIRefTest.php | 13 -------- .../SAML2/XML/saml/AttributeStatementTest.php | 17 ----------- tests/SAML2/XML/saml/AttributeTest.php | 14 --------- tests/SAML2/XML/saml/AttributeValueTest.php | 18 ----------- .../XML/saml/AudienceRestrictionTest.php | 16 ---------- tests/SAML2/XML/saml/AudienceTest.php | 13 -------- .../XML/saml/AuthenticatingAuthorityTest.php | 13 -------- .../XML/saml/AuthnContextClassRefTest.php | 16 ---------- .../XML/saml/AuthnContextDeclRefTest.php | 16 ---------- tests/SAML2/XML/saml/AuthnContextDeclTest.php | 16 ---------- ...AuthnContextWithClassRefAndDeclRefTest.php | 16 ---------- .../AuthnContextWithClassRefAndDeclTest.php | 16 ---------- .../XML/saml/AuthnContextWithClassRefTest.php | 16 ---------- .../XML/saml/AuthnContextWithDeclRefTest.php | 16 ---------- .../XML/saml/AuthnContextWithDeclTest.php | 16 ---------- tests/SAML2/XML/saml/AuthnStatementTest.php | 13 -------- .../XML/saml/AuthzDecisionStatementTest.php | 13 -------- tests/SAML2/XML/saml/BaseIDTest.php | 1 + tests/SAML2/XML/saml/ConditionTest.php | 14 --------- tests/SAML2/XML/saml/ConditionsTest.php | 16 ---------- .../SAML2/XML/saml/EncryptedAssertionTest.php | 13 -------- .../SAML2/XML/saml/EncryptedAttributeTest.php | 11 ------- tests/SAML2/XML/saml/EncryptedIDTest.php | 13 -------- tests/SAML2/XML/saml/EvidenceTest.php | 13 -------- tests/SAML2/XML/saml/IssuerTest.php | 13 -------- tests/SAML2/XML/saml/NameIDTest.php | 16 ---------- tests/SAML2/XML/saml/OneTimeUseTest.php | 13 -------- tests/SAML2/XML/saml/ProxyRestrictionTest.php | 16 ---------- tests/SAML2/XML/saml/StatementTest.php | 1 + .../XML/saml/SubjectConfirmationDataTest.php | 13 -------- .../XML/saml/SubjectConfirmationTest.php | 13 -------- tests/SAML2/XML/saml/SubjectLocalityTest.php | 13 -------- tests/SAML2/XML/saml/SubjectTest.php | 1 + .../XML/samlp/AbstractStatusResponseTest.php | 1 + tests/SAML2/XML/samlp/ArtifactResolveTest.php | 12 -------- .../SAML2/XML/samlp/ArtifactResponseTest.php | 13 -------- .../XML/samlp/AssertionIDRequestTest.php | 13 -------- tests/SAML2/XML/samlp/AttributeQueryTest.php | 11 ------- tests/SAML2/XML/samlp/AuthnQueryTest.php | 11 ------- tests/SAML2/XML/samlp/AuthnRequestTest.php | 13 -------- .../XML/samlp/AuthzDecisionQueryTest.php | 11 ------- tests/SAML2/XML/samlp/ExtensionsTest.php | 13 -------- tests/SAML2/XML/samlp/GetCompleteTest.php | 13 -------- tests/SAML2/XML/samlp/IDPEntryTest.php | 13 -------- tests/SAML2/XML/samlp/IDPListTest.php | 13 -------- tests/SAML2/XML/samlp/LogoutRequestTest.php | 1 + tests/SAML2/XML/samlp/LogoutResponseTest.php | 13 -------- tests/SAML2/XML/samlp/NameIDPolicyTest.php | 13 -------- .../XML/samlp/RequestedAuthnContextTest.php | 13 -------- tests/SAML2/XML/samlp/RequesterIDTest.php | 13 -------- tests/SAML2/XML/samlp/ResponseTest.php | 14 --------- tests/SAML2/XML/samlp/ScopingTest.php | 13 -------- tests/SAML2/XML/samlp/SessionIndexTest.php | 13 -------- tests/SAML2/XML/samlp/StatusCodeTest.php | 13 -------- tests/SAML2/XML/samlp/StatusDetailTest.php | 13 -------- tests/SAML2/XML/samlp/StatusMessageTest.php | 14 --------- tests/SAML2/XML/samlp/StatusTest.php | 13 -------- tests/SAML2/XML/shibmd/KeyAuthorityTest.php | 30 ------------------- tests/SAML2/XML/shibmd/ScopeTest.php | 12 -------- 128 files changed, 10 insertions(+), 1685 deletions(-) diff --git a/composer.json b/composer.json index dab64c898..4bec1a40c 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "psr/http-message": "^2.0", "psr/log": "^2.0 || ^3.0", "simplesamlphp/assert": "^1.0", - "simplesamlphp/xml-common": "^1.12", + "simplesamlphp/xml-common": "^1.14", "simplesamlphp/xml-security": "^1.6", "simplesamlphp/xml-soap": "^1.3" }, diff --git a/tests/SAML2/XML/alg/DigestMethodTest.php b/tests/SAML2/XML/alg/DigestMethodTest.php index e75d8e003..a39ff7e83 100644 --- a/tests/SAML2/XML/alg/DigestMethodTest.php +++ b/tests/SAML2/XML/alg/DigestMethodTest.php @@ -67,19 +67,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $digestMethod = DigestMethod::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($digestMethod), - ); - } - - /** */ public function testUnmarshallingMissingAlgorithmThrowsException(): void diff --git a/tests/SAML2/XML/alg/SigningMethodTest.php b/tests/SAML2/XML/alg/SigningMethodTest.php index 272fc0c30..b40994b8b 100644 --- a/tests/SAML2/XML/alg/SigningMethodTest.php +++ b/tests/SAML2/XML/alg/SigningMethodTest.php @@ -69,19 +69,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $signingMethod = SigningMethod::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($signingMethod), - ); - } - - /** */ public function testMissingAlgorithmThrowsException(): void diff --git a/tests/SAML2/XML/ecp/RelayStateTest.php b/tests/SAML2/XML/ecp/RelayStateTest.php index 2ae7be3b9..41515d3f8 100644 --- a/tests/SAML2/XML/ecp/RelayStateTest.php +++ b/tests/SAML2/XML/ecp/RelayStateTest.php @@ -59,19 +59,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $relayState = RelayState::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($relayState), - ); - } - - /** */ public function testUnmarshallingWithMissingMustUnderstandThrowsException(): void diff --git a/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php b/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php index ec2e0db70..ee9156312 100644 --- a/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php +++ b/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php @@ -54,19 +54,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $ra = RequestAuthenticated::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ra), - ); - } - - /** */ public function testUnmarshallingWithMissingActorThrowsException(): void diff --git a/tests/SAML2/XML/ecp/RequestTest.php b/tests/SAML2/XML/ecp/RequestTest.php index 16d11b789..902b1e4bd 100644 --- a/tests/SAML2/XML/ecp/RequestTest.php +++ b/tests/SAML2/XML/ecp/RequestTest.php @@ -75,19 +75,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $request = Request::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($request), - ); - } - - /** */ public function testUnmarshallingWithMissingMustUnderstandThrowsException(): void diff --git a/tests/SAML2/XML/ecp/ResponseTest.php b/tests/SAML2/XML/ecp/ResponseTest.php index cca54fc61..f1726eb90 100644 --- a/tests/SAML2/XML/ecp/ResponseTest.php +++ b/tests/SAML2/XML/ecp/ResponseTest.php @@ -85,19 +85,6 @@ public function testInvalidACSThrowsException(): void } - /** - */ - public function testUnmarshalling(): void - { - $response = Response::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($response), - ); - } - - /** */ public function testUnmarshallingWithMissingMustUnderstandThrowsException(): void diff --git a/tests/SAML2/XML/ecp/SubjectConfirmationTest.php b/tests/SAML2/XML/ecp/SubjectConfirmationTest.php index 5a25fb1b5..6ca4a88ae 100644 --- a/tests/SAML2/XML/ecp/SubjectConfirmationTest.php +++ b/tests/SAML2/XML/ecp/SubjectConfirmationTest.php @@ -82,19 +82,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $subjectConfirmation = SubjectConfirmation::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($subjectConfirmation), - ); - } - - /** */ public function testUnmarshallingWithMissingMustUnderstandThrowsException(): void diff --git a/tests/SAML2/XML/emd/RepublishRequestTest.php b/tests/SAML2/XML/emd/RepublishRequestTest.php index 1d3c0c733..b98b4d187 100644 --- a/tests/SAML2/XML/emd/RepublishRequestTest.php +++ b/tests/SAML2/XML/emd/RepublishRequestTest.php @@ -62,18 +62,4 @@ public function testMarshalling(): void strval($republishRequest), ); } - - - /** - * Unmarshalling - */ - public function testUnmarshalling(): void - { - $republishRequest = RepublishRequest::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($republishRequest), - ); - } } diff --git a/tests/SAML2/XML/emd/RepublishTargetTest.php b/tests/SAML2/XML/emd/RepublishTargetTest.php index 9f963584a..d71f0013d 100644 --- a/tests/SAML2/XML/emd/RepublishTargetTest.php +++ b/tests/SAML2/XML/emd/RepublishTargetTest.php @@ -63,15 +63,4 @@ public function testMarshallingIncorrectValueThrowsException(): void new RepublishTarget('http://example.org/'); } - - - /** - * Unmarshalling - */ - public function testUnmarshalling(): void - { - $republishTarget = RepublishTarget::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals('http://edugain.org/', $republishTarget->getContent()); - } } diff --git a/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php b/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php index 76eeb9b54..318651251 100644 --- a/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php +++ b/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php @@ -119,20 +119,6 @@ public function testMarshallingWithResponseLocation(): void // test unmarshalling - /** - * Test creating a DiscoveryResponse from XML. - */ - public function testUnmarshalling(): void - { - $discoResponse = DiscoveryResponse::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($discoResponse), - ); - } - - /** * Test that creating a DiscoveryResponse from XML fails when ResponseLocation is present. */ diff --git a/tests/SAML2/XML/init/RequestInitiatorTest.php b/tests/SAML2/XML/init/RequestInitiatorTest.php index 02a91431f..d460b886f 100644 --- a/tests/SAML2/XML/init/RequestInitiatorTest.php +++ b/tests/SAML2/XML/init/RequestInitiatorTest.php @@ -75,20 +75,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a RequestInitiator from XML. - */ - public function testUnmarshalling(): void - { - $requestInitiator = RequestInitiator::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($requestInitiator), - ); - } - - /** * Test that creating a RequestInitiator from XML with an invalid Binding fails. */ diff --git a/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php b/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php index 884c79445..af65c7aae 100644 --- a/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php +++ b/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php @@ -75,20 +75,6 @@ public function testMarshallingWithEmptyNamespace(): void // test unmarshalling - /** - * Test creating an AdditionalMetadataLocation object from XML. - */ - public function testUnmarshalling(): void - { - $additionalMetadataLocation = AdditionalMetadataLocation::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($additionalMetadataLocation), - ); - } - - /** * Test that creating an AdditionalMetadataLocation from XML fails if "namespace" is missing. */ diff --git a/tests/SAML2/XML/md/AffiliateMemberTest.php b/tests/SAML2/XML/md/AffiliateMemberTest.php index 96ed9648b..3e375b80c 100644 --- a/tests/SAML2/XML/md/AffiliateMemberTest.php +++ b/tests/SAML2/XML/md/AffiliateMemberTest.php @@ -84,21 +84,4 @@ public function testMarshallingTooLongContentThrowsException(): void new AffiliateMember(str_pad('https://some.entity.org/id', C::ENTITYID_MAX_LENGTH + 1, 'a')); } - - - // test unmarshalling - - - /** - * Test creating a AffiliateMember from XML. - */ - public function testUnmarshalling(): void - { - $affiliateMember = AffiliateMember::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($affiliateMember), - ); - } } diff --git a/tests/SAML2/XML/md/AffiliationDescriptorTest.php b/tests/SAML2/XML/md/AffiliationDescriptorTest.php index e4cf3eabd..d9b0f26a3 100644 --- a/tests/SAML2/XML/md/AffiliationDescriptorTest.php +++ b/tests/SAML2/XML/md/AffiliationDescriptorTest.php @@ -120,20 +120,6 @@ public function testMarshallingWithEmptyMemberList(): void // test unmarshalling - /** - * Test creating an AffiliationDescriptor from XML. - */ - public function testUnmarshalling(): void - { - $affiliationDescriptor = AffiliationDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($affiliationDescriptor), - ); - } - - /** * Test failure to create an AffiliationDescriptor from XML when there's no affiliation members. */ diff --git a/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php b/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php index 93f2f032f..ee417ed1f 100644 --- a/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php +++ b/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php @@ -111,20 +111,6 @@ public function testMarshallingWithResponseLocation(): void // test unmarshalling - /** - * Test creating a ArtifactResolutionService from XML. - */ - public function testUnmarshalling(): void - { - $ars = ArtifactResolutionService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ars), - ); - } - - /** * Test that creating a ArtifactResolutionService from XML fails when ResponseLocation is present. */ diff --git a/tests/SAML2/XML/md/AssertionConsumerServiceTest.php b/tests/SAML2/XML/md/AssertionConsumerServiceTest.php index b1103ec50..d3486f162 100644 --- a/tests/SAML2/XML/md/AssertionConsumerServiceTest.php +++ b/tests/SAML2/XML/md/AssertionConsumerServiceTest.php @@ -94,21 +94,4 @@ public function testMarshalling(): void strval($idxep), ); } - - - // test unmarshalling - - - /** - * Test creating an IndexedEndpointType from XML. - */ - public function testUnmarshalling(): void - { - $idxep = AssertionConsumerService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($idxep), - ); - } } diff --git a/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php b/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php index c4423e307..9bb64e059 100644 --- a/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php +++ b/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php @@ -275,20 +275,6 @@ public function testMarshallingWithWrongAttribute(): void // test unmarshalling - /** - * Test creating an AttributeAuthorityDescriptor from XML - */ - public function testUnmarshalling(): void - { - $aad = AttributeAuthorityDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($aad), - ); - } - - /** * Test that creating an AttributeAuthorityDescriptor without any optional element works. */ diff --git a/tests/SAML2/XML/md/AttributeConsumingServiceTest.php b/tests/SAML2/XML/md/AttributeConsumingServiceTest.php index 547598377..a6382990b 100644 --- a/tests/SAML2/XML/md/AttributeConsumingServiceTest.php +++ b/tests/SAML2/XML/md/AttributeConsumingServiceTest.php @@ -171,20 +171,6 @@ public function testMarshallingWithEmptyRequestedAttributes(): void // test unmarshalling - /** - * Test creating an AssertionConsumerService from XML. - */ - public function testUnmarshalling(): void - { - $acs = AttributeConsumingService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($acs), - ); - } - - /** * Test that creating an AssertionConsumerService from XML fails if index is missing. */ diff --git a/tests/SAML2/XML/md/AttributeProfileTest.php b/tests/SAML2/XML/md/AttributeProfileTest.php index 1098c2b87..8e819e9f2 100644 --- a/tests/SAML2/XML/md/AttributeProfileTest.php +++ b/tests/SAML2/XML/md/AttributeProfileTest.php @@ -58,20 +58,4 @@ public function testMarshalling(): void strval($attributeProfile), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $attributeProfile = AttributeProfile::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($attributeProfile), - ); - } } diff --git a/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php b/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php index 6f7cd869b..1217404b2 100644 --- a/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php +++ b/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php @@ -163,20 +163,6 @@ public function testMarshallingWithWrongAssertionIDRequestService(): void // test unmarshalling - /** - * Test creating an AuthnAuthorityDescriptor from XML. - */ - public function testUnmarshalling(): void - { - $aad = AuthnAuthorityDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($aad), - ); - } - - /** * Test that creating an AuthnAuthorityDescriptor from XML fails if no AuthnQueryService was provided. */ diff --git a/tests/SAML2/XML/md/CompanyTest.php b/tests/SAML2/XML/md/CompanyTest.php index 8b182c8fe..9c93416dd 100644 --- a/tests/SAML2/XML/md/CompanyTest.php +++ b/tests/SAML2/XML/md/CompanyTest.php @@ -57,21 +57,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a Company from XML. - */ - public function testUnmarshalling(): void - { - $name = Company::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/ContactPersonTest.php b/tests/SAML2/XML/md/ContactPersonTest.php index b2f5e9594..f8456e24a 100644 --- a/tests/SAML2/XML/md/ContactPersonTest.php +++ b/tests/SAML2/XML/md/ContactPersonTest.php @@ -130,20 +130,6 @@ public function testMarshallingWithWrongType(): void // test unmarshalling - /** - * Test creating a ContactPerson from XML. - */ - public function testUnmarshalling(): void - { - $contactPerson = ContactPerson::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($contactPerson), - ); - } - - /** * Test that creating a ContactPerson from XML without a contactType attribute fails. */ diff --git a/tests/SAML2/XML/md/EmailAddressTest.php b/tests/SAML2/XML/md/EmailAddressTest.php index bf369fddc..37c9b09ff 100644 --- a/tests/SAML2/XML/md/EmailAddressTest.php +++ b/tests/SAML2/XML/md/EmailAddressTest.php @@ -73,20 +73,6 @@ public function testInvalidEmailThrowsException(): void // test unmarshalling - /** - * Test creating a EmailAddress from XML. - */ - public function testUnmarshalling(): void - { - $name = EmailAddress::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating an EmailAddress from XML fails when an invalid email address is found. */ diff --git a/tests/SAML2/XML/md/EncryptionMethodTest.php b/tests/SAML2/XML/md/EncryptionMethodTest.php index d16c15ede..dad5e2431 100644 --- a/tests/SAML2/XML/md/EncryptionMethodTest.php +++ b/tests/SAML2/XML/md/EncryptionMethodTest.php @@ -122,20 +122,6 @@ public function testMarshallingElementOrdering(): void // test unmarshalling - /** - * Test creating an EncryptionMethod object from XML. - */ - public function testUnmarshalling(): void - { - $encryptionMethod = EncryptionMethod::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($encryptionMethod), - ); - } - - /** * Test that creating an EncryptionMethod object from XML without an Algorithm attribute fails. */ diff --git a/tests/SAML2/XML/md/EndpointTypeTest.php b/tests/SAML2/XML/md/EndpointTypeTest.php index 60f28e103..c5dee014d 100644 --- a/tests/SAML2/XML/md/EndpointTypeTest.php +++ b/tests/SAML2/XML/md/EndpointTypeTest.php @@ -125,20 +125,6 @@ public function testMarshallingWithoutOptionalAttributes(): void // test unmarshalling - /** - * Test creating an EndpointType from XML. - */ - public function testUnmarshalling(): void - { - $endpointType = AttributeService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($endpointType), - ); - } - - /** * Test that creating an EndpointType from XML checks the actual name of the endpoint. */ diff --git a/tests/SAML2/XML/md/EntitiesDescriptorTest.php b/tests/SAML2/XML/md/EntitiesDescriptorTest.php index e0421df64..7d6baae7d 100644 --- a/tests/SAML2/XML/md/EntitiesDescriptorTest.php +++ b/tests/SAML2/XML/md/EntitiesDescriptorTest.php @@ -149,20 +149,6 @@ public function testMarshallingEmpty(): void // test unmarshalling - /** - * Test creating an EntitiesDescriptor from XML. - */ - public function testUnmarshalling(): void - { - $entitiesd = EntitiesDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($entitiesd), - ); - } - - /** * Test that creating an EntitiesDescriptor without Name from XML works. */ diff --git a/tests/SAML2/XML/md/EntityDescriptorTest.php b/tests/SAML2/XML/md/EntityDescriptorTest.php index 0f6293ef0..7627efaea 100644 --- a/tests/SAML2/XML/md/EntityDescriptorTest.php +++ b/tests/SAML2/XML/md/EntityDescriptorTest.php @@ -352,6 +352,7 @@ public function testMarshallingWithLongEntityID(): void /** * Test creating an EntityDescriptor from XML. */ + #[\Override] public function testUnmarshalling(): void { $xmlRepresentation = clone self::$xmlRepresentation; diff --git a/tests/SAML2/XML/md/ExtensionsTest.php b/tests/SAML2/XML/md/ExtensionsTest.php index de7e4ca73..bb3685a4d 100644 --- a/tests/SAML2/XML/md/ExtensionsTest.php +++ b/tests/SAML2/XML/md/ExtensionsTest.php @@ -150,6 +150,7 @@ public function testMarshallingWithSamlDefinedNamespacedExtensions(): void /** * This method tests for known extensions. */ + #[\Override] public function testUnmarshalling(): void { $document = DOMDocumentFactory::fromString(<<documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/IDPSSODescriptorTest.php b/tests/SAML2/XML/md/IDPSSODescriptorTest.php index 5d30febbe..c769a5522 100644 --- a/tests/SAML2/XML/md/IDPSSODescriptorTest.php +++ b/tests/SAML2/XML/md/IDPSSODescriptorTest.php @@ -314,20 +314,6 @@ public function testMarshallingWithoutOptionalArguments(): void // test unmarshalling - /** - * Test creating an IDPSSODescriptor from XML. - */ - public function testUnmarshalling(): void - { - $idpssod = IDPSSODescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($idpssod), - ); - } - - /** * Test that creating an IDPSSODescriptor from XML fails if no SingleSignOnService endpoint is provided. */ diff --git a/tests/SAML2/XML/md/KeyDescriptorTest.php b/tests/SAML2/XML/md/KeyDescriptorTest.php index 1a92809e5..f0380d23d 100644 --- a/tests/SAML2/XML/md/KeyDescriptorTest.php +++ b/tests/SAML2/XML/md/KeyDescriptorTest.php @@ -109,20 +109,6 @@ public function testMarshallingWithoutOptionalParameters(): void // test unmarshalling - /** - * Test creating a KeyDescriptor from XML. - */ - public function testUnmarshalling(): void - { - $kd = KeyDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($kd), - ); - } - - /** * Test that creating a KeyDescriptor from XML with a wrong use fails. */ diff --git a/tests/SAML2/XML/md/NameIDFormatTest.php b/tests/SAML2/XML/md/NameIDFormatTest.php index e6e7570ac..8b2241091 100644 --- a/tests/SAML2/XML/md/NameIDFormatTest.php +++ b/tests/SAML2/XML/md/NameIDFormatTest.php @@ -58,20 +58,4 @@ public function testMarshalling(): void strval($nameIdFormat), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $nameIdFormat = NameIDFormat::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($nameIdFormat), - ); - } } diff --git a/tests/SAML2/XML/md/NameIDMappingServiceTest.php b/tests/SAML2/XML/md/NameIDMappingServiceTest.php index 3ada09e5c..2499b5952 100644 --- a/tests/SAML2/XML/md/NameIDMappingServiceTest.php +++ b/tests/SAML2/XML/md/NameIDMappingServiceTest.php @@ -76,20 +76,6 @@ public function testMarshallingWithResponseLocation(): void // test unmarshalling - /** - * Test creating a NameIDMappingService from XML. - */ - public function testUnmarshalling(): void - { - $nidmsep = NameIDMappingService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($nidmsep), - ); - } - - /** * Test that creating a NameIDMappingService from XML fails when ResponseLocation is present. */ diff --git a/tests/SAML2/XML/md/OrganizationDisplayNameTest.php b/tests/SAML2/XML/md/OrganizationDisplayNameTest.php index 82b5f2e39..8f667a1c7 100644 --- a/tests/SAML2/XML/md/OrganizationDisplayNameTest.php +++ b/tests/SAML2/XML/md/OrganizationDisplayNameTest.php @@ -63,21 +63,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a OrganizationDisplayName from XML. - */ - public function testUnmarshalling(): void - { - $name = OrganizationDisplayName::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/OrganizationNameTest.php b/tests/SAML2/XML/md/OrganizationNameTest.php index d0f0bfc84..06f8d4554 100644 --- a/tests/SAML2/XML/md/OrganizationNameTest.php +++ b/tests/SAML2/XML/md/OrganizationNameTest.php @@ -63,21 +63,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a OrganizationName from XML. - */ - public function testUnmarshalling(): void - { - $name = OrganizationName::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/OrganizationTest.php b/tests/SAML2/XML/md/OrganizationTest.php index 4393ecee0..07fb9eeb9 100644 --- a/tests/SAML2/XML/md/OrganizationTest.php +++ b/tests/SAML2/XML/md/OrganizationTest.php @@ -100,21 +100,4 @@ public function testMarshalling(): void strval($org), ); } - - - // test unmarshalling - - - /** - * Test creating an Organization object from XML - */ - public function testUnmarshalling(): void - { - $org = Organization::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($org), - ); - } } diff --git a/tests/SAML2/XML/md/OrganizationURLTest.php b/tests/SAML2/XML/md/OrganizationURLTest.php index c810c4555..6da70f6b4 100644 --- a/tests/SAML2/XML/md/OrganizationURLTest.php +++ b/tests/SAML2/XML/md/OrganizationURLTest.php @@ -71,20 +71,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a OrganizationURL from XML. - */ - public function testUnmarshalling(): void - { - $name = OrganizationURL::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a OrganizationURL with an invalid url throws an exception */ diff --git a/tests/SAML2/XML/md/PDPDescriptorTest.php b/tests/SAML2/XML/md/PDPDescriptorTest.php index db6fa4a42..b2e326cab 100644 --- a/tests/SAML2/XML/md/PDPDescriptorTest.php +++ b/tests/SAML2/XML/md/PDPDescriptorTest.php @@ -146,20 +146,6 @@ public function testMarshallingWithoutOptionalArguments(): void // test unmarshalling - /** - * Test creating a PDPDescriptor object from XML. - */ - public function testUnmarshalling(): void - { - $pdpd = PDPDescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($pdpd), - ); - } - - /** * Test that creating a PDPDescriptor from XML fails when there's no AuthzService endpoint. */ diff --git a/tests/SAML2/XML/md/RequestedAttributeTest.php b/tests/SAML2/XML/md/RequestedAttributeTest.php index fa861a076..e2587fa88 100644 --- a/tests/SAML2/XML/md/RequestedAttributeTest.php +++ b/tests/SAML2/XML/md/RequestedAttributeTest.php @@ -84,20 +84,6 @@ public function testMarshallingWithoutOptionalArguments(): void // test unmarshalling - /** - * Test creating a RequestedAttribute object from XML - */ - public function testUnmarshalling(): void - { - $ra = RequestedAttribute::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ra), - ); - } - - /** * Test that creating a RequestedAttribute object from XML works when isRequired is missing. */ diff --git a/tests/SAML2/XML/md/RoleDescriptorTest.php b/tests/SAML2/XML/md/RoleDescriptorTest.php index 0be052d02..09561680b 100644 --- a/tests/SAML2/XML/md/RoleDescriptorTest.php +++ b/tests/SAML2/XML/md/RoleDescriptorTest.php @@ -170,6 +170,7 @@ public function testMarshalling(): void /** * Test unmarshalling a known object as a RoleDescriptor. */ + #[\Override] public function testUnmarshalling(): void { $descriptor = AbstractRoleDescriptor::fromXML(self::$xmlRepresentation->documentElement); diff --git a/tests/SAML2/XML/md/SPSSODescriptorTest.php b/tests/SAML2/XML/md/SPSSODescriptorTest.php index 0c95f224f..faf909e4f 100644 --- a/tests/SAML2/XML/md/SPSSODescriptorTest.php +++ b/tests/SAML2/XML/md/SPSSODescriptorTest.php @@ -235,20 +235,6 @@ public function testMarshallingWithoutOptionalArguments(): void // test unmarshalling - /** - * Test creating an SPSSODescriptor from XML. - */ - public function testUnmarshalling(): void - { - $spssod = SPSSODescriptor::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($spssod), - ); - } - - /** * Test that creating an SPSSODescriptor from XML fails if no AssertionConsumerService is specified. */ diff --git a/tests/SAML2/XML/md/ServiceDescriptionTest.php b/tests/SAML2/XML/md/ServiceDescriptionTest.php index c205e91e2..aee7ad9bc 100644 --- a/tests/SAML2/XML/md/ServiceDescriptionTest.php +++ b/tests/SAML2/XML/md/ServiceDescriptionTest.php @@ -63,21 +63,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a ServiceDescription from XML. - */ - public function testUnmarshalling(): void - { - $name = ServiceDescription::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/ServiceNameTest.php b/tests/SAML2/XML/md/ServiceNameTest.php index fa13f780c..4840d0f2b 100644 --- a/tests/SAML2/XML/md/ServiceNameTest.php +++ b/tests/SAML2/XML/md/ServiceNameTest.php @@ -81,20 +81,6 @@ public function testMarshallingWithEmptyLang(): void // test unmarshalling - /** - * Test creating a ServiceName from XML. - */ - public function testUnmarshalling(): void - { - $name = ServiceName::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a ServiceName from XML fails when xml:lang is missing. */ diff --git a/tests/SAML2/XML/md/SingleSignOnServiceTest.php b/tests/SAML2/XML/md/SingleSignOnServiceTest.php index da7cb3ba9..dd08601f2 100644 --- a/tests/SAML2/XML/md/SingleSignOnServiceTest.php +++ b/tests/SAML2/XML/md/SingleSignOnServiceTest.php @@ -77,20 +77,6 @@ public function testMarshallingWithResponseLocation(): void // test unmarshalling - /** - * Test creating a SingleSignOnService from XML. - */ - public function testUnmarshalling(): void - { - $ssoep = SingleSignOnService::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ssoep), - ); - } - - /** * Test that creating a SingleSignOnService from XML fails when ResponseLocation is present. */ diff --git a/tests/SAML2/XML/md/SurNameTest.php b/tests/SAML2/XML/md/SurNameTest.php index 3e288a9ed..d9e19aaaa 100644 --- a/tests/SAML2/XML/md/SurNameTest.php +++ b/tests/SAML2/XML/md/SurNameTest.php @@ -57,21 +57,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a SurName from XML. - */ - public function testUnmarshalling(): void - { - $name = SurName::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/md/TelephoneNumberTest.php b/tests/SAML2/XML/md/TelephoneNumberTest.php index 3ec2e2b8d..5ffa4c806 100644 --- a/tests/SAML2/XML/md/TelephoneNumberTest.php +++ b/tests/SAML2/XML/md/TelephoneNumberTest.php @@ -58,21 +58,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a TelephoneNumber from XML. - */ - public function testUnmarshalling(): void - { - $name = TelephoneNumber::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/mdattr/EntityAttributesTest.php b/tests/SAML2/XML/mdattr/EntityAttributesTest.php index 7661ec5fd..f0a82db8d 100644 --- a/tests/SAML2/XML/mdattr/EntityAttributesTest.php +++ b/tests/SAML2/XML/mdattr/EntityAttributesTest.php @@ -168,17 +168,4 @@ public function testMarshalling(): void strval($entityAttributes), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $entityAttributes = EntityAttributes::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($entityAttributes), - ); - } } diff --git a/tests/SAML2/XML/mdrpi/PublicationInfoTest.php b/tests/SAML2/XML/mdrpi/PublicationInfoTest.php index a84846e60..2625ded02 100644 --- a/tests/SAML2/XML/mdrpi/PublicationInfoTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationInfoTest.php @@ -77,19 +77,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $publicationInfo = PublicationInfo::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($publicationInfo), - ); - } - - /** */ public function testCreationInstantTimezoneNotZuluThrowsException(): void diff --git a/tests/SAML2/XML/mdrpi/PublicationPathTest.php b/tests/SAML2/XML/mdrpi/PublicationPathTest.php index fad4431a8..a692b251b 100644 --- a/tests/SAML2/XML/mdrpi/PublicationPathTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationPathTest.php @@ -97,16 +97,4 @@ public function testMarshallingWithNoPublications(): void ); $this->assertTrue($publicationPath->isEmptyElement()); } - - /** - */ - public function testUnmarshalling(): void - { - $publicationPath = PublicationPath::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($publicationPath), - ); - } } diff --git a/tests/SAML2/XML/mdrpi/PublicationTest.php b/tests/SAML2/XML/mdrpi/PublicationTest.php index d6fef3254..2e18571ea 100644 --- a/tests/SAML2/XML/mdrpi/PublicationTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationTest.php @@ -71,19 +71,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $publication = Publication::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($publication), - ); - } - - /** */ public function testCreationInstantTimezoneNotZuluThrowsException(): void diff --git a/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php b/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php index 250eeed08..14f0bc73c 100644 --- a/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php +++ b/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php @@ -78,19 +78,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $registrationInfo = RegistrationInfo::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($registrationInfo), - ); - } - - /** */ public function testMissingPublisherThrowsException(): void diff --git a/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php b/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php index 9bb39c7bd..dae73593b 100644 --- a/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php +++ b/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php @@ -71,20 +71,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a RegistrationPolicy from XML. - */ - public function testUnmarshalling(): void - { - $name = RegistrationPolicy::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a RegistrationPolicy with an invalid url throws an exception */ diff --git a/tests/SAML2/XML/mdrpi/UsagePolicyTest.php b/tests/SAML2/XML/mdrpi/UsagePolicyTest.php index 05a00101d..8d9a1ef6e 100644 --- a/tests/SAML2/XML/mdrpi/UsagePolicyTest.php +++ b/tests/SAML2/XML/mdrpi/UsagePolicyTest.php @@ -71,20 +71,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a UsagePolicy from XML. - */ - public function testUnmarshalling(): void - { - $name = UsagePolicy::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a UsagePolicy with an invalid url throws an exception */ diff --git a/tests/SAML2/XML/mdui/DescriptionTest.php b/tests/SAML2/XML/mdui/DescriptionTest.php index 45b9ead15..5dfc18c0c 100644 --- a/tests/SAML2/XML/mdui/DescriptionTest.php +++ b/tests/SAML2/XML/mdui/DescriptionTest.php @@ -63,21 +63,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a Description from XML. - */ - public function testUnmarshalling(): void - { - $name = Description::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/mdui/DiscoHintsTest.php b/tests/SAML2/XML/mdui/DiscoHintsTest.php index 18242ddd8..582a6e9c4 100644 --- a/tests/SAML2/XML/mdui/DiscoHintsTest.php +++ b/tests/SAML2/XML/mdui/DiscoHintsTest.php @@ -91,20 +91,6 @@ public function testMarshallingEmptyElement(): void } - /** - * Test unmarshalling a basic DiscoHints element - */ - public function testUnmarshalling(): void - { - $discoHints = DiscoHints::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($discoHints), - ); - } - - /** * Add a Keywords element to the children attribute */ diff --git a/tests/SAML2/XML/mdui/DisplayNameTest.php b/tests/SAML2/XML/mdui/DisplayNameTest.php index 12cbdb9d3..98d33bf8c 100644 --- a/tests/SAML2/XML/mdui/DisplayNameTest.php +++ b/tests/SAML2/XML/mdui/DisplayNameTest.php @@ -63,21 +63,4 @@ public function testMarshalling(): void strval($name), ); } - - - // test unmarshalling - - - /** - * Test creating a DisplayName from XML. - */ - public function testUnmarshalling(): void - { - $name = DisplayName::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } } diff --git a/tests/SAML2/XML/mdui/DomainHintTest.php b/tests/SAML2/XML/mdui/DomainHintTest.php index e352b9615..dddfee0cd 100644 --- a/tests/SAML2/XML/mdui/DomainHintTest.php +++ b/tests/SAML2/XML/mdui/DomainHintTest.php @@ -62,20 +62,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a DomainHint from XML. - */ - public function testUnmarshalling(): void - { - $hint = DomainHint::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($hint), - ); - } - - /** * Test creating a DomainHint from XML with false domain */ diff --git a/tests/SAML2/XML/mdui/GeolocationHintTest.php b/tests/SAML2/XML/mdui/GeolocationHintTest.php index 071f19ca5..7a45e45dc 100644 --- a/tests/SAML2/XML/mdui/GeolocationHintTest.php +++ b/tests/SAML2/XML/mdui/GeolocationHintTest.php @@ -56,21 +56,4 @@ public function testMarshalling(): void strval($hint), ); } - - - // test unmarshalling - - - /** - * Test creating a GeolocationHint from XML. - */ - public function testUnmarshalling(): void - { - $hint = GeolocationHint::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($hint), - ); - } } diff --git a/tests/SAML2/XML/mdui/IPHintTest.php b/tests/SAML2/XML/mdui/IPHintTest.php index 8879c47e2..1f050fd8a 100644 --- a/tests/SAML2/XML/mdui/IPHintTest.php +++ b/tests/SAML2/XML/mdui/IPHintTest.php @@ -56,21 +56,4 @@ public function testMarshalling(): void strval($hint), ); } - - - // test unmarshalling - - - /** - * Test creating a IPHint from XML. - */ - public function testUnmarshalling(): void - { - $hint = IPHint::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($hint), - ); - } } diff --git a/tests/SAML2/XML/mdui/InformationURLTest.php b/tests/SAML2/XML/mdui/InformationURLTest.php index 90bdb50d7..bbc26a59b 100644 --- a/tests/SAML2/XML/mdui/InformationURLTest.php +++ b/tests/SAML2/XML/mdui/InformationURLTest.php @@ -71,20 +71,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a InformationURL from XML. - */ - public function testUnmarshalling(): void - { - $name = InformationURL::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a InformationURL with an invalid url throws an exception */ diff --git a/tests/SAML2/XML/mdui/KeywordsTest.php b/tests/SAML2/XML/mdui/KeywordsTest.php index e4b2a4037..c7b6e1852 100644 --- a/tests/SAML2/XML/mdui/KeywordsTest.php +++ b/tests/SAML2/XML/mdui/KeywordsTest.php @@ -77,20 +77,6 @@ public function testKeywordWithPlusSignThrowsException(): void } - /** - * Unmarshalling of a keywords tag - */ - public function testUnmarshalling(): void - { - $keywords = Keywords::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($keywords), - ); - } - - /** * Unmarshalling fails if attribute is empty */ diff --git a/tests/SAML2/XML/mdui/LogoTest.php b/tests/SAML2/XML/mdui/LogoTest.php index 1ac304fd9..a6b0ca122 100644 --- a/tests/SAML2/XML/mdui/LogoTest.php +++ b/tests/SAML2/XML/mdui/LogoTest.php @@ -77,20 +77,6 @@ public function testMarshalling(): void } - /** - * Unmarshalling of a logo tag - */ - public function testUnmarshalling(): void - { - $logo = Logo::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($logo), - ); - } - - /** * Unmarshalling of a logo tag without a language */ diff --git a/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php b/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php index 70600ba8f..745717320 100644 --- a/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php +++ b/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php @@ -70,20 +70,6 @@ public function testMarshalling(): void // test unmarshalling - /** - * Test creating a PrivacyStatementURL from XML. - */ - public function testUnmarshalling(): void - { - $name = PrivacyStatementURL::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($name), - ); - } - - /** * Test that creating a PrivacyStatementURL with an invalid url throws an exception */ diff --git a/tests/SAML2/XML/mdui/UIInfoTest.php b/tests/SAML2/XML/mdui/UIInfoTest.php index 68d252cb7..5a7a2f9b0 100644 --- a/tests/SAML2/XML/mdui/UIInfoTest.php +++ b/tests/SAML2/XML/mdui/UIInfoTest.php @@ -194,20 +194,6 @@ public function testMarshallingEmptyElement(): void } - /** - * Test unmarshalling a basic UIInfo element - */ - public function testUnmarshalling(): void - { - $uiinfo = UIInfo::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($uiinfo), - ); - } - - /** */ public function testMultipleDescriptionWithSameLanguageThrowsException(): void diff --git a/tests/SAML2/XML/saml/ActionTest.php b/tests/SAML2/XML/saml/ActionTest.php index bcd32dee7..68caff7e0 100644 --- a/tests/SAML2/XML/saml/ActionTest.php +++ b/tests/SAML2/XML/saml/ActionTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($action), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $action = Action::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($action), - ); - } } diff --git a/tests/SAML2/XML/saml/AdviceTest.php b/tests/SAML2/XML/saml/AdviceTest.php index b9d9a2e0b..74641d15b 100644 --- a/tests/SAML2/XML/saml/AdviceTest.php +++ b/tests/SAML2/XML/saml/AdviceTest.php @@ -112,17 +112,4 @@ public function testMarshallingWithNoContent(): void ); $this->assertTrue($advice->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $advice = Advice::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($advice), - ); - } } diff --git a/tests/SAML2/XML/saml/AssertionIDRefTest.php b/tests/SAML2/XML/saml/AssertionIDRefTest.php index 9358c207a..c63602597 100644 --- a/tests/SAML2/XML/saml/AssertionIDRefTest.php +++ b/tests/SAML2/XML/saml/AssertionIDRefTest.php @@ -52,17 +52,4 @@ public function testMarshalling(): void strval($assertionIDRef), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $assertionIDRef = AssertionIDRef::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($assertionIDRef), - ); - } } diff --git a/tests/SAML2/XML/saml/AssertionTest.php b/tests/SAML2/XML/saml/AssertionTest.php index 13d81899b..13f68255c 100644 --- a/tests/SAML2/XML/saml/AssertionTest.php +++ b/tests/SAML2/XML/saml/AssertionTest.php @@ -191,6 +191,7 @@ public function testMarshalling(): void /** * Test to parse a basic assertion */ + #[\Override] public function testUnmarshalling(): void { $accr = C::AUTHNCONTEXT_CLASS_REF_LOA1; diff --git a/tests/SAML2/XML/saml/AssertionURIRefTest.php b/tests/SAML2/XML/saml/AssertionURIRefTest.php index 5fb97d7af..b8bb70691 100644 --- a/tests/SAML2/XML/saml/AssertionURIRefTest.php +++ b/tests/SAML2/XML/saml/AssertionURIRefTest.php @@ -52,17 +52,4 @@ public function testMarshalling(): void strval($assertionURIRef), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $assertionURIRef = AssertionURIRef::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($assertionURIRef), - ); - } } diff --git a/tests/SAML2/XML/saml/AttributeStatementTest.php b/tests/SAML2/XML/saml/AttributeStatementTest.php index a72817535..ca8c318d7 100644 --- a/tests/SAML2/XML/saml/AttributeStatementTest.php +++ b/tests/SAML2/XML/saml/AttributeStatementTest.php @@ -88,23 +88,6 @@ public function testMarshallingMissingAttributesThrowsException(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $attrStatement = AttributeStatement::fromXML(self::$xmlRepresentation->documentElement); - - $attributes = $attrStatement->getAttributes(); - $this->assertCount(3, $attributes); - $this->assertEquals('urn:ServiceID', $attributes[0]->getName()); - $this->assertEquals('urn:EntityConcernedID', $attributes[1]->getName()); - $this->assertEquals('urn:EntityConcernedSubID', $attributes[2]->getName()); - - $this->assertEmpty($attrStatement->getEncryptedAttributes()); - $this->assertFalse($attrStatement->hasEncryptedAttributes()); - } - - /** */ public function testUnmarshallingMissingAttributesThrowsException(): void diff --git a/tests/SAML2/XML/saml/AttributeTest.php b/tests/SAML2/XML/saml/AttributeTest.php index 70eb48fb8..ab00128f3 100644 --- a/tests/SAML2/XML/saml/AttributeTest.php +++ b/tests/SAML2/XML/saml/AttributeTest.php @@ -101,20 +101,6 @@ public function testMarshalling(): void // unmarshalling - /** - * Test creating of an Attribute from XML. - */ - public function testUnmarshalling(): void - { - $attribute = Attribute::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($attribute), - ); - } - - /** * Test that creating an Attribute from XML fails if no Name is provided. */ diff --git a/tests/SAML2/XML/saml/AttributeValueTest.php b/tests/SAML2/XML/saml/AttributeValueTest.php index 7905fc3e9..e5bd51fe0 100644 --- a/tests/SAML2/XML/saml/AttributeValueTest.php +++ b/tests/SAML2/XML/saml/AttributeValueTest.php @@ -115,24 +115,6 @@ public function testEmptyStringAttribute(): void // unmarshalling - /** - * Verifies that we can create an AttributeValue from a DOMElement. - * - */ - public function testUnmarshalling(): void - { - $av = AttributeValue::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertIsInt($av->getValue()); - $this->assertEquals(2, $av->getValue()); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($av), - ); - } - - /** * Verifies that we can create an AttributeValue containing a NameID from a DOMElement. * diff --git a/tests/SAML2/XML/saml/AudienceRestrictionTest.php b/tests/SAML2/XML/saml/AudienceRestrictionTest.php index 62b3aeb0a..59f1063ab 100644 --- a/tests/SAML2/XML/saml/AudienceRestrictionTest.php +++ b/tests/SAML2/XML/saml/AudienceRestrictionTest.php @@ -61,20 +61,4 @@ public function testMarshalling(): void strval($condition), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $condition = AudienceRestriction::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($condition), - ); - } } diff --git a/tests/SAML2/XML/saml/AudienceTest.php b/tests/SAML2/XML/saml/AudienceTest.php index cac4b30c7..19743d1e2 100644 --- a/tests/SAML2/XML/saml/AudienceTest.php +++ b/tests/SAML2/XML/saml/AudienceTest.php @@ -53,17 +53,4 @@ public function testMarshalling(): void strval($audience), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $audience = Audience::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($audience), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php b/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php index 79d3267a0..857fe9e83 100644 --- a/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php +++ b/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php @@ -52,17 +52,4 @@ public function testMarshalling(): void strval($authenticatingAuthority), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $authenticatingAuthority = AuthenticatingAuthority::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authenticatingAuthority), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextClassRefTest.php b/tests/SAML2/XML/saml/AuthnContextClassRefTest.php index a0496bbd8..8dba85910 100644 --- a/tests/SAML2/XML/saml/AuthnContextClassRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextClassRefTest.php @@ -54,20 +54,4 @@ public function testMarshalling(): void strval($authnContextClassRef), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContextClassRef = AuthnContextClassRef::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContextClassRef), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php index 5db95544f..f8772610e 100644 --- a/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php @@ -55,20 +55,4 @@ public function testMarshalling(): void strval($authnContextDeclRef), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContextDeclRef = AuthnContextDeclRef::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContextDeclRef), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextDeclTest.php b/tests/SAML2/XML/saml/AuthnContextDeclTest.php index f3400d609..b814457c5 100644 --- a/tests/SAML2/XML/saml/AuthnContextDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextDeclTest.php @@ -71,20 +71,4 @@ public function testMarshalling(): void strval($authnContextDecl), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContextDecl = AuthnContextDecl::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContextDecl), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php index 19dcf2e0d..c4a52848c 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($authnContext), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContext = AuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContext), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php index 9a7ce8b24..81f26614a 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php @@ -80,20 +80,4 @@ public function testMarshalling(): void strval($authnContext), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContext = AuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContext), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php index 818e69947..af464f7e3 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php @@ -61,20 +61,4 @@ public function testMarshalling(): void strval($authnContext), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContext = AuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContext), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php index 95e284d0d..9ace7dc71 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php @@ -61,20 +61,4 @@ public function testMarshalling(): void strval($authnContext), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContext = AuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContext), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php b/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php index 33b47ed4e..5078c64c8 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php @@ -79,20 +79,4 @@ public function testMarshalling(): void strval($authnContext), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $authnContext = AuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnContext), - ); - } } diff --git a/tests/SAML2/XML/saml/AuthnStatementTest.php b/tests/SAML2/XML/saml/AuthnStatementTest.php index 34a18542c..52092063f 100644 --- a/tests/SAML2/XML/saml/AuthnStatementTest.php +++ b/tests/SAML2/XML/saml/AuthnStatementTest.php @@ -118,19 +118,6 @@ public function testMarshallingElementOrdering(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $authnStatement = AuthnStatement::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnStatement), - ); - } - - /** */ public function testUnmarshallingWithoutAuthnContextThrowsException(): void diff --git a/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php b/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php index b76b02a56..497d9ce9e 100644 --- a/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php +++ b/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php @@ -72,17 +72,4 @@ public function testMarshalling(): void strval($authzDecisionStatement), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $authzDecisionStatement = AuthzDecisionStatement::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authzDecisionStatement), - ); - } } diff --git a/tests/SAML2/XML/saml/BaseIDTest.php b/tests/SAML2/XML/saml/BaseIDTest.php index 7f02123a5..334602dd0 100644 --- a/tests/SAML2/XML/saml/BaseIDTest.php +++ b/tests/SAML2/XML/saml/BaseIDTest.php @@ -94,6 +94,7 @@ public function testMarshalling(): void /** * Test unmarshalling a registered class */ + #[\Override] public function testUnmarshalling(): void { $baseId = AbstractBaseID::fromXML(self::$xmlRepresentation->documentElement); diff --git a/tests/SAML2/XML/saml/ConditionTest.php b/tests/SAML2/XML/saml/ConditionTest.php index 90ea11318..68ff0e622 100644 --- a/tests/SAML2/XML/saml/ConditionTest.php +++ b/tests/SAML2/XML/saml/ConditionTest.php @@ -88,20 +88,6 @@ public function testMarshalling(): void // unmarshalling - /** - * Test unmarshalling a registered class - */ - public function testUnmarshalling(): void - { - $condition = CustomCondition::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($condition), - ); - } - - /** */ public function testUnmarshallingUnregistered(): void diff --git a/tests/SAML2/XML/saml/ConditionsTest.php b/tests/SAML2/XML/saml/ConditionsTest.php index 673bbbc38..c913695f7 100644 --- a/tests/SAML2/XML/saml/ConditionsTest.php +++ b/tests/SAML2/XML/saml/ConditionsTest.php @@ -95,20 +95,4 @@ public function testMarshallingWithNoElements(): void ); $this->assertTrue($conditions->isEmptyElement()); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $conditions = Conditions::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($conditions), - ); - } } diff --git a/tests/SAML2/XML/saml/EncryptedAssertionTest.php b/tests/SAML2/XML/saml/EncryptedAssertionTest.php index 857f17b2c..d3cd9f48d 100644 --- a/tests/SAML2/XML/saml/EncryptedAssertionTest.php +++ b/tests/SAML2/XML/saml/EncryptedAssertionTest.php @@ -125,19 +125,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $encryptedAssertion = EncryptedAssertion::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($encryptedAssertion), - ); - } - - /** * Test encryption / decryption */ diff --git a/tests/SAML2/XML/saml/EncryptedAttributeTest.php b/tests/SAML2/XML/saml/EncryptedAttributeTest.php index ec7c91ccd..974751c80 100644 --- a/tests/SAML2/XML/saml/EncryptedAttributeTest.php +++ b/tests/SAML2/XML/saml/EncryptedAttributeTest.php @@ -94,17 +94,6 @@ public function testMarshalling(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $encryptedAttribute = EncryptedAttribute::fromXML(self::$xmlRepresentation->documentElement); - - $encryptedData = $encryptedAttribute->getEncryptedData(); - $this->assertEquals(C::XMLENC_ELEMENT, $encryptedData->getType()); - } - - /** */ public function testDecryptAttribute(): void diff --git a/tests/SAML2/XML/saml/EncryptedIDTest.php b/tests/SAML2/XML/saml/EncryptedIDTest.php index 58f4da0eb..11e803ee4 100644 --- a/tests/SAML2/XML/saml/EncryptedIDTest.php +++ b/tests/SAML2/XML/saml/EncryptedIDTest.php @@ -172,19 +172,6 @@ public function testMarshallingElementOrdering(): void } - /** - */ - public function testUnmarshalling(): void - { - $eid = EncryptedID::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($eid), - ); - } - - /** * Test encryption / decryption */ diff --git a/tests/SAML2/XML/saml/EvidenceTest.php b/tests/SAML2/XML/saml/EvidenceTest.php index b801b90ee..005c178c3 100644 --- a/tests/SAML2/XML/saml/EvidenceTest.php +++ b/tests/SAML2/XML/saml/EvidenceTest.php @@ -105,17 +105,4 @@ public function testMarshallingWithNoContent(): void ); $this->assertTrue($evidence->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $evidence = Evidence::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($evidence), - ); - } } diff --git a/tests/SAML2/XML/saml/IssuerTest.php b/tests/SAML2/XML/saml/IssuerTest.php index 0be1cbb02..e0297a4b4 100644 --- a/tests/SAML2/XML/saml/IssuerTest.php +++ b/tests/SAML2/XML/saml/IssuerTest.php @@ -105,19 +105,6 @@ public function testMarshallingNoFormat(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $issuer = Issuer::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($issuer), - ); - } - - /** * Test that creating an Issuer from XML contains no attributes when format is "entity". */ diff --git a/tests/SAML2/XML/saml/NameIDTest.php b/tests/SAML2/XML/saml/NameIDTest.php index 8b051d4fe..1feb10eef 100644 --- a/tests/SAML2/XML/saml/NameIDTest.php +++ b/tests/SAML2/XML/saml/NameIDTest.php @@ -73,20 +73,4 @@ public function testMarshalling(): void strval($nameId), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $nameId = NameID::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($nameId), - ); - } } diff --git a/tests/SAML2/XML/saml/OneTimeUseTest.php b/tests/SAML2/XML/saml/OneTimeUseTest.php index 4d90c9d3b..4ee61c300 100644 --- a/tests/SAML2/XML/saml/OneTimeUseTest.php +++ b/tests/SAML2/XML/saml/OneTimeUseTest.php @@ -53,17 +53,4 @@ public function testMarshalling(): void strval($oneTimeUse), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $oneTimeUse = OneTimeUse::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($oneTimeUse), - ); - } } diff --git a/tests/SAML2/XML/saml/ProxyRestrictionTest.php b/tests/SAML2/XML/saml/ProxyRestrictionTest.php index a26b33f46..3e305f1ee 100644 --- a/tests/SAML2/XML/saml/ProxyRestrictionTest.php +++ b/tests/SAML2/XML/saml/ProxyRestrictionTest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($condition), ); } - - - // unmarshalling - - - /** - */ - public function testUnmarshalling(): void - { - $condition = ProxyRestriction::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($condition), - ); - } } diff --git a/tests/SAML2/XML/saml/StatementTest.php b/tests/SAML2/XML/saml/StatementTest.php index cdd22131f..1b252e5c9 100644 --- a/tests/SAML2/XML/saml/StatementTest.php +++ b/tests/SAML2/XML/saml/StatementTest.php @@ -92,6 +92,7 @@ public function testMarshalling(): void /** * Test unmarshalling a registered class */ + #[\Override] public function testUnmarshalling(): void { $statement = CustomStatement::fromXML(self::$xmlRepresentation->documentElement); diff --git a/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php b/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php index f0b345e7e..4f12fc90a 100644 --- a/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php +++ b/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php @@ -130,19 +130,6 @@ public function testMarshallingWithNonIPAddress(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $subjectConfirmationData = SubjectConfirmationData::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($subjectConfirmationData), - ); - } - - /** */ public function testUnmarshallingEmpty(): void diff --git a/tests/SAML2/XML/saml/SubjectConfirmationTest.php b/tests/SAML2/XML/saml/SubjectConfirmationTest.php index 822c580f8..e9705a533 100644 --- a/tests/SAML2/XML/saml/SubjectConfirmationTest.php +++ b/tests/SAML2/XML/saml/SubjectConfirmationTest.php @@ -154,19 +154,6 @@ public function testMarshallingElementOrdering(): void // unmarshalling - /** - */ - public function testUnmarshalling(): void - { - $subjectConfirmation = SubjectConfirmation::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($subjectConfirmation), - ); - } - - /** */ public function testMethodMissingThrowsException(): void diff --git a/tests/SAML2/XML/saml/SubjectLocalityTest.php b/tests/SAML2/XML/saml/SubjectLocalityTest.php index 25c74e0a9..1e25e27e1 100644 --- a/tests/SAML2/XML/saml/SubjectLocalityTest.php +++ b/tests/SAML2/XML/saml/SubjectLocalityTest.php @@ -79,17 +79,4 @@ public function testMarshallingWithNoElements(): void ); $this->assertTrue($subjectLocality->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $subjectLocality = SubjectLocality::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($subjectLocality), - ); - } } diff --git a/tests/SAML2/XML/saml/SubjectTest.php b/tests/SAML2/XML/saml/SubjectTest.php index 4a6562e9c..de79fe389 100644 --- a/tests/SAML2/XML/saml/SubjectTest.php +++ b/tests/SAML2/XML/saml/SubjectTest.php @@ -251,6 +251,7 @@ public function testMarshallingBaseID(): void /** */ + #[\Override] public function testUnmarshalling(): void { $document = clone self::$subject; diff --git a/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php b/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php index f6031f1f1..df587879a 100644 --- a/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php +++ b/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php @@ -141,6 +141,7 @@ public function testMarshallingSignedResponseElementOrdering(): void /** */ + #[\Override] public function testUnmarshalling(): void { $xml = <<documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ar), - ); - } } diff --git a/tests/SAML2/XML/samlp/ArtifactResponseTest.php b/tests/SAML2/XML/samlp/ArtifactResponseTest.php index 5df1f8ea9..afd987735 100644 --- a/tests/SAML2/XML/samlp/ArtifactResponseTest.php +++ b/tests/SAML2/XML/samlp/ArtifactResponseTest.php @@ -92,17 +92,4 @@ public function testMarshalling(): void strval($artifactResponse), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $ar = ArtifactResponse::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($ar), - ); - } } diff --git a/tests/SAML2/XML/samlp/AssertionIDRequestTest.php b/tests/SAML2/XML/samlp/AssertionIDRequestTest.php index f24c28b93..f26e40845 100644 --- a/tests/SAML2/XML/samlp/AssertionIDRequestTest.php +++ b/tests/SAML2/XML/samlp/AssertionIDRequestTest.php @@ -70,17 +70,4 @@ public function testMarshalling(): void strval($assertionIDRequest), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $assertionIDRequest = AssertionIDRequest::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($assertionIDRequest), - ); - } } diff --git a/tests/SAML2/XML/samlp/AttributeQueryTest.php b/tests/SAML2/XML/samlp/AttributeQueryTest.php index dbb3237e8..2d0c52b32 100644 --- a/tests/SAML2/XML/samlp/AttributeQueryTest.php +++ b/tests/SAML2/XML/samlp/AttributeQueryTest.php @@ -115,17 +115,6 @@ public function testMarshalling(): void } - public function testUnmarshalling(): void - { - $aq = AttributeQuery::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($aq), - ); - } - - public function testAttributeNameFormat(): void { $nameId = new NameID('NameIDValue'); diff --git a/tests/SAML2/XML/samlp/AuthnQueryTest.php b/tests/SAML2/XML/samlp/AuthnQueryTest.php index 9fe5e1718..ff30d1cd9 100644 --- a/tests/SAML2/XML/samlp/AuthnQueryTest.php +++ b/tests/SAML2/XML/samlp/AuthnQueryTest.php @@ -83,15 +83,4 @@ public function testMarshalling(): void strval($authnQuery), ); } - - - public function testUnmarshalling(): void - { - $authnQuery = AuthnQuery::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnQuery), - ); - } } diff --git a/tests/SAML2/XML/samlp/AuthnRequestTest.php b/tests/SAML2/XML/samlp/AuthnRequestTest.php index c3b4fbc5b..38a30c47b 100644 --- a/tests/SAML2/XML/samlp/AuthnRequestTest.php +++ b/tests/SAML2/XML/samlp/AuthnRequestTest.php @@ -457,17 +457,4 @@ public function testEmptySubjectThrowsException(): void ); AuthnRequest::fromXML(DOMDocumentFactory::fromString($xml)->documentElement); } - - - /** - */ - public function testUnmarshalling(): void - { - $authnRequest = AuthnRequest::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authnRequest), - ); - } } diff --git a/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php b/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php index 1c29541f5..0b28155a1 100644 --- a/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php +++ b/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php @@ -91,15 +91,4 @@ public function testMarshalling(): void strval($authzDecisionQuery), ); } - - - public function testUnmarshalling(): void - { - $authzDecisionQuery = AuthzDecisionQuery::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($authzDecisionQuery), - ); - } } diff --git a/tests/SAML2/XML/samlp/ExtensionsTest.php b/tests/SAML2/XML/samlp/ExtensionsTest.php index 104ee6a2e..bf3bb67f5 100644 --- a/tests/SAML2/XML/samlp/ExtensionsTest.php +++ b/tests/SAML2/XML/samlp/ExtensionsTest.php @@ -72,19 +72,6 @@ public function testMarshalling(): void } - /** - */ - public function testUnmarshalling(): void - { - $extensions = Extensions::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($extensions), - ); - } - - /** * Adding a non-namespaced element to an md:Extensions element should throw an exception */ diff --git a/tests/SAML2/XML/samlp/GetCompleteTest.php b/tests/SAML2/XML/samlp/GetCompleteTest.php index 64c26a020..31ba51ba0 100644 --- a/tests/SAML2/XML/samlp/GetCompleteTest.php +++ b/tests/SAML2/XML/samlp/GetCompleteTest.php @@ -59,17 +59,4 @@ public function testMarshalling(): void strval($getComplete), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $getComplete = GetComplete::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($getComplete), - ); - } } diff --git a/tests/SAML2/XML/samlp/IDPEntryTest.php b/tests/SAML2/XML/samlp/IDPEntryTest.php index 0338eb928..815c35207 100644 --- a/tests/SAML2/XML/samlp/IDPEntryTest.php +++ b/tests/SAML2/XML/samlp/IDPEntryTest.php @@ -82,17 +82,4 @@ public function testMarshallingNullables(): void strval($entry), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $entry = IDPEntry::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($entry), - ); - } } diff --git a/tests/SAML2/XML/samlp/IDPListTest.php b/tests/SAML2/XML/samlp/IDPListTest.php index 5740ed573..2ccebffbf 100644 --- a/tests/SAML2/XML/samlp/IDPListTest.php +++ b/tests/SAML2/XML/samlp/IDPListTest.php @@ -125,19 +125,6 @@ public function testMarshallingNullables(): void } - /** - */ - public function testUnmarshalling(): void - { - $list = IDPList::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($list), - ); - } - - /** */ public function testZeroIDPEntriesThrowsException(): void diff --git a/tests/SAML2/XML/samlp/LogoutRequestTest.php b/tests/SAML2/XML/samlp/LogoutRequestTest.php index 92dfe3f1c..b930077a9 100644 --- a/tests/SAML2/XML/samlp/LogoutRequestTest.php +++ b/tests/SAML2/XML/samlp/LogoutRequestTest.php @@ -145,6 +145,7 @@ public function testMarshallingElementOrdering(): void /** */ + #[\Override] public function testUnmarshalling(): void { $container = ContainerSingleton::getInstance(); diff --git a/tests/SAML2/XML/samlp/LogoutResponseTest.php b/tests/SAML2/XML/samlp/LogoutResponseTest.php index af6feede8..35063223b 100644 --- a/tests/SAML2/XML/samlp/LogoutResponseTest.php +++ b/tests/SAML2/XML/samlp/LogoutResponseTest.php @@ -71,17 +71,4 @@ public function testMarshalling(): void strval($logoutResponse) ); } - - - /** - */ - public function testUnmarshalling(): void - { - $logoutResponse = LogoutResponse::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($logoutResponse), - ); - } } diff --git a/tests/SAML2/XML/samlp/NameIDPolicyTest.php b/tests/SAML2/XML/samlp/NameIDPolicyTest.php index e91141bc0..048f57125 100644 --- a/tests/SAML2/XML/samlp/NameIDPolicyTest.php +++ b/tests/SAML2/XML/samlp/NameIDPolicyTest.php @@ -100,17 +100,4 @@ public function testMarshallingEmptyElement(): void ); $this->assertTrue($nameIdPolicy->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $nameIdPolicy = NameIDPolicy::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($nameIdPolicy), - ); - } } diff --git a/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php b/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php index 908998cc0..f442a4542 100644 --- a/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php +++ b/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php @@ -98,19 +98,6 @@ public function testMarshallingWithInvalidContentFails(): void } - /** - */ - public function testUnmarshalling(): void - { - $requestedAuthnContext = RequestedAuthnContext::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($requestedAuthnContext), - ); - } - - /** */ public function testUnmarshallingWithMixedContextsFails(): void diff --git a/tests/SAML2/XML/samlp/RequesterIDTest.php b/tests/SAML2/XML/samlp/RequesterIDTest.php index 7bab01007..da13dd1f6 100644 --- a/tests/SAML2/XML/samlp/RequesterIDTest.php +++ b/tests/SAML2/XML/samlp/RequesterIDTest.php @@ -52,17 +52,4 @@ public function testMarshalling(): void strval($requesterId), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $requesterId = RequesterID::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($requesterId), - ); - } } diff --git a/tests/SAML2/XML/samlp/ResponseTest.php b/tests/SAML2/XML/samlp/ResponseTest.php index 7cf4c9374..18e27383b 100644 --- a/tests/SAML2/XML/samlp/ResponseTest.php +++ b/tests/SAML2/XML/samlp/ResponseTest.php @@ -77,18 +77,4 @@ public function testMarshalling(): void strval($response), ); } - - - /** - * Unmarshalling of a response tag - */ - public function testUnmarshalling(): void - { - $response = Response::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($response), - ); - } } diff --git a/tests/SAML2/XML/samlp/ScopingTest.php b/tests/SAML2/XML/samlp/ScopingTest.php index 0b30302d4..694d07b8a 100644 --- a/tests/SAML2/XML/samlp/ScopingTest.php +++ b/tests/SAML2/XML/samlp/ScopingTest.php @@ -107,17 +107,4 @@ public function testMarshallingWithNoElements(): void ); $this->assertTrue($scoping->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $scoping = Scoping::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($scoping), - ); - } } diff --git a/tests/SAML2/XML/samlp/SessionIndexTest.php b/tests/SAML2/XML/samlp/SessionIndexTest.php index e9ceec49d..b9559df59 100644 --- a/tests/SAML2/XML/samlp/SessionIndexTest.php +++ b/tests/SAML2/XML/samlp/SessionIndexTest.php @@ -52,17 +52,4 @@ public function testMarshalling(): void strval($sessionIndex), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $sessionIndex = SessionIndex::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($sessionIndex), - ); - } } diff --git a/tests/SAML2/XML/samlp/StatusCodeTest.php b/tests/SAML2/XML/samlp/StatusCodeTest.php index 4c0c3edc7..00d09b52d 100644 --- a/tests/SAML2/XML/samlp/StatusCodeTest.php +++ b/tests/SAML2/XML/samlp/StatusCodeTest.php @@ -61,17 +61,4 @@ public function testMarshalling(): void strval($statusCode), ); } - - - /** - */ - public function testUnmarshalling(): void - { - $statusCode = StatusCode::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($statusCode), - ); - } } diff --git a/tests/SAML2/XML/samlp/StatusDetailTest.php b/tests/SAML2/XML/samlp/StatusDetailTest.php index c233e8593..5efba8617 100644 --- a/tests/SAML2/XML/samlp/StatusDetailTest.php +++ b/tests/SAML2/XML/samlp/StatusDetailTest.php @@ -74,17 +74,4 @@ public function testMarshallingEmptyElement(): void ); $this->assertTrue($statusDetail->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $statusDetail = StatusDetail::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($statusDetail), - ); - } } diff --git a/tests/SAML2/XML/samlp/StatusMessageTest.php b/tests/SAML2/XML/samlp/StatusMessageTest.php index 251dfb6f2..08e5f943f 100644 --- a/tests/SAML2/XML/samlp/StatusMessageTest.php +++ b/tests/SAML2/XML/samlp/StatusMessageTest.php @@ -47,20 +47,6 @@ public function testMarshalling(): void { $statusMessage = new StatusMessage('Something went wrong'); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($statusMessage), - ); - } - - - /** - */ - public function testUnmarshalling(): void - { - $statusMessage = StatusMessage::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), strval($statusMessage), diff --git a/tests/SAML2/XML/samlp/StatusTest.php b/tests/SAML2/XML/samlp/StatusTest.php index 6ff602a90..8bf13aa66 100644 --- a/tests/SAML2/XML/samlp/StatusTest.php +++ b/tests/SAML2/XML/samlp/StatusTest.php @@ -118,17 +118,4 @@ public function testMarshallingElementOrdering(): void $this->assertEquals('samlp:StatusMessage', $statusElements[0]->tagName); $this->assertEquals('samlp:StatusDetail', $statusElements[1]->tagName); } - - - /** - */ - public function testUnmarshalling(): void - { - $status = Status::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($status), - ); - } } diff --git a/tests/SAML2/XML/shibmd/KeyAuthorityTest.php b/tests/SAML2/XML/shibmd/KeyAuthorityTest.php index e522dd277..d4c04b2e0 100644 --- a/tests/SAML2/XML/shibmd/KeyAuthorityTest.php +++ b/tests/SAML2/XML/shibmd/KeyAuthorityTest.php @@ -81,34 +81,4 @@ public function testMarshalling(): void strval($keyAuthority), ); } - - - /** - * Unmarshalling a KeyAuthority. - */ - public function testUnmarshalling(): void - { - $keyAuthority = KeyAuthority::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals(2, $keyAuthority->getVerifyDepth()); - - $keys = $keyAuthority->getKeys(); - $this->assertCount(2, $keys); - - $this->assertEquals('abc123', $keys[0]->getId()); - $this->assertEquals('def456', $keys[1]->getId()); - - $attributes = $keyAuthority->getAttributesNS(); - $this->assertCount(1, $attributes); - - $attribute = array_pop($attributes); - $this->assertEquals( - [ - 'namespaceURI' => 'urn:test:something', - 'namespacePrefix' => 'test', - 'attrName' => 'attr1', - 'attrValue' => 'testval1', - ], - $attribute->toArray(), - ); - } } diff --git a/tests/SAML2/XML/shibmd/ScopeTest.php b/tests/SAML2/XML/shibmd/ScopeTest.php index c1604939d..116ea8dfd 100644 --- a/tests/SAML2/XML/shibmd/ScopeTest.php +++ b/tests/SAML2/XML/shibmd/ScopeTest.php @@ -101,18 +101,6 @@ public function testMarshallingRegexp(): void } - /** - * Unmarshalling a scope in literal (non-regexp) form. - */ - public function testUnmarshalling(): void - { - $scope = Scope::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals('example.org', $scope->getContent()); - $this->assertFalse($scope->isRegexpScope()); - } - - /** * Unmarshalling a scope that does not specify an explicit * regexp value (assumed to be false).