From 07b178c27e18a00f338a21e66f35a9df7e88b3ec Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 25 Dec 2023 23:43:26 +0100 Subject: [PATCH] Implement generic version of testUnmarshalling --- composer.json | 2 +- tests/WSSecurity/XML/auth/ClaimTypeTest.php | 16 ------------ tests/WSSecurity/XML/auth/DescriptionTest.php | 16 ------------ tests/WSSecurity/XML/auth/DisplayNameTest.php | 16 ------------ .../WSSecurity/XML/auth/DisplayValueTest.php | 16 ------------ .../XML/auth/EncryptedValueTest.php | 16 ------------ .../XML/auth/StructuredValueTest.php | 16 ------------ .../XML/auth/ValueGreaterThanOrEqualTest.php | 16 ------------ .../XML/auth/ValueGreaterThanTest.php | 16 ------------ .../WSSecurity/XML/auth/ValueInRangenTest.php | 16 ------------ .../XML/auth/ValueLessThanOrEqualTest.php | 16 ------------ .../WSSecurity/XML/auth/ValueLessThanTest.php | 16 ------------ .../XML/auth/ValueLowerBoundTest.php | 16 ------------ .../ValueOneOfWithStructuredValuesTest.php | 16 ------------ .../XML/auth/ValueOneOfWithValuesTest.php | 16 ------------ tests/WSSecurity/XML/auth/ValueTest.php | 16 ------------ .../XML/auth/ValueUpperBoundTest.php | 16 ------------ .../fed/ApplicationServiceEndpointTest.php | 16 ------------ .../XML/fed/AttributeServiceEndpointTest.php | 16 ------------ tests/WSSecurity/XML/fed/ClaimDialectTest.php | 16 ------------ .../XML/fed/ClaimDialectsOfferedTest.php | 16 ------------ tests/WSSecurity/XML/fed/IssuerNameTest.php | 16 ------------ .../fed/LogicalServiceNamesOfferedTest.php | 19 -------------- .../XML/fed/PassiveRequestorEndpointTest.php | 19 -------------- .../XML/fed/PsuedonymServiceEndpointsTest.php | 16 ------------ .../fed/SecurityTokenServiceEndpointTest.php | 19 -------------- .../SingleSignOutNotificationEndpointTest.php | 19 -------------- .../SingleSignOutSubscriptionEndpointTest.php | 19 -------------- tests/WSSecurity/XML/fed/TargetScopesTest.php | 16 ------------ tests/WSSecurity/XML/fed/TokenTypeTest.php | 16 ------------ .../XML/fed/TokenTypesOfferedTest.php | 16 ------------ tests/WSSecurity/XML/wsa/ActionTest.php | 16 ------------ tests/WSSecurity/XML/wsa/AddressTest.php | 16 ------------ .../XML/wsa/EndpointReferenceTest.php | 16 ------------ tests/WSSecurity/XML/wsa/FaultToTest.php | 16 ------------ tests/WSSecurity/XML/wsa/FromTest.php | 16 ------------ tests/WSSecurity/XML/wsa/MessageIDTest.php | 16 ------------ tests/WSSecurity/XML/wsa/MetadataTest.php | 26 ------------------- .../WSSecurity/XML/wsa/ProblemActionTest.php | 16 ------------ .../XML/wsa/ProblemHeaderQNameTest.php | 16 ------------ tests/WSSecurity/XML/wsa/ProblemIRITest.php | 16 ------------ .../XML/wsa/ReferenceParametersTest.php | 26 ------------------- tests/WSSecurity/XML/wsa/RelatesToTest.php | 24 ----------------- tests/WSSecurity/XML/wsa/ReplyToTest.php | 16 ------------ tests/WSSecurity/XML/wsa/RetryAfterTest.php | 17 ------------ tests/WSSecurity/XML/wsa/SoapActionTest.php | 16 ------------ tests/WSSecurity/XML/wsa/ToTest.php | 16 ------------ .../XML/wsse/BinarySecurityTokenTest.php | 16 ------------ tests/WSSecurity/XML/wsse/EmbeddedTest.php | 16 ------------ .../WSSecurity/XML/wsse/KeyIdentifierTest.php | 16 ------------ tests/WSSecurity/XML/wsse/NonceTest.php | 16 ------------ tests/WSSecurity/XML/wsse/PasswordTest.php | 16 ------------ tests/WSSecurity/XML/wsse/ReferenceTest.php | 16 ------------ .../XML/wsse/SecurityTokenReferenceTest.php | 16 ------------ .../XML/wsse/TransformationParametersTest.php | 16 ------------ tests/WSSecurity/XML/wsse/UsernameTest.php | 16 ------------ .../WSSecurity/XML/wsse/UsernameTokenTest.php | 16 ------------ tests/WSSecurity/XML/wsu/CreatedTest.php | 16 ------------ tests/WSSecurity/XML/wsu/ExpiresTest.php | 16 ------------ tests/WSSecurity/XML/wsu/TimestampTest.php | 16 ------------ 60 files changed, 1 insertion(+), 989 deletions(-) diff --git a/composer.json b/composer.json index fb901269..0eb705fb 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "simplesamlphp/assert": "^1.0", "simplesamlphp/saml2": "^5@dev", "simplesamlphp/xml-security": "^1.7", - "simplesamlphp/xml-common": "^1.13" + "simplesamlphp/xml-common": "^1.14" }, "require-dev": { "simplesamlphp/simplesamlphp-test-framework": "^1.5" diff --git a/tests/WSSecurity/XML/auth/ClaimTypeTest.php b/tests/WSSecurity/XML/auth/ClaimTypeTest.php index 3ad0d61b..87bfca09 100644 --- a/tests/WSSecurity/XML/auth/ClaimTypeTest.php +++ b/tests/WSSecurity/XML/auth/ClaimTypeTest.php @@ -105,20 +105,4 @@ public function testMarshallingElementOrdering(): void $this->assertEquals('auth:DisplayValue', $claimTypeElements[1]->tagName); $this->assertEquals('auth:Value', $claimTypeElements[2]->tagName); } - - - // test unmarshalling - - - /** - * Test creating a ClaimType from XML. - */ - public function testUnmarshalling(): void - { - $claimType = ClaimType::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($claimType), - ); - } } diff --git a/tests/WSSecurity/XML/auth/DescriptionTest.php b/tests/WSSecurity/XML/auth/DescriptionTest.php index c8b9070c..39aa46eb 100644 --- a/tests/WSSecurity/XML/auth/DescriptionTest.php +++ b/tests/WSSecurity/XML/auth/DescriptionTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($description) ); } - - - // test unmarshalling - - - /** - * Test creating a Description from XML. - */ - public function testUnmarshalling(): void - { - $description = Description::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($description) - ); - } } diff --git a/tests/WSSecurity/XML/auth/DisplayNameTest.php b/tests/WSSecurity/XML/auth/DisplayNameTest.php index a5f35f7e..9c80acdd 100644 --- a/tests/WSSecurity/XML/auth/DisplayNameTest.php +++ b/tests/WSSecurity/XML/auth/DisplayNameTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($displayName) ); } - - - // test unmarshalling - - - /** - * Test creating a DisplayName from XML. - */ - public function testUnmarshalling(): void - { - $displayName = DisplayName::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($displayName) - ); - } } diff --git a/tests/WSSecurity/XML/auth/DisplayValueTest.php b/tests/WSSecurity/XML/auth/DisplayValueTest.php index f2f0069a..a50f09c2 100644 --- a/tests/WSSecurity/XML/auth/DisplayValueTest.php +++ b/tests/WSSecurity/XML/auth/DisplayValueTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($displayValue) ); } - - - // test unmarshalling - - - /** - * Test creating a DisplayValue from XML. - */ - public function testUnmarshalling(): void - { - $displayValue = DisplayValue::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($displayValue) - ); - } } diff --git a/tests/WSSecurity/XML/auth/EncryptedValueTest.php b/tests/WSSecurity/XML/auth/EncryptedValueTest.php index de6af10d..43628aec 100644 --- a/tests/WSSecurity/XML/auth/EncryptedValueTest.php +++ b/tests/WSSecurity/XML/auth/EncryptedValueTest.php @@ -85,20 +85,4 @@ public function testMarshalling(): void strval($encryptedValue), ); } - - - // test unmarshalling - - - /** - * Test creating a DisplayName from XML. - */ - public function testUnmarshalling(): void - { - $encryptedValue = EncryptedValue::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($encryptedValue), - ); - } } diff --git a/tests/WSSecurity/XML/auth/StructuredValueTest.php b/tests/WSSecurity/XML/auth/StructuredValueTest.php index 56b92791..7bea17e8 100644 --- a/tests/WSSecurity/XML/auth/StructuredValueTest.php +++ b/tests/WSSecurity/XML/auth/StructuredValueTest.php @@ -65,20 +65,4 @@ public function testMarshalling(): void strval($structuredValue), ); } - - - // test unmarshalling - - - /** - * Test creating a StructuredValue from XML. - */ - public function testUnmarshalling(): void - { - $structuredValue = StructuredValue::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($structuredValue), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueGreaterThanOrEqualTest.php b/tests/WSSecurity/XML/auth/ValueGreaterThanOrEqualTest.php index a26a65ff..9701e86e 100644 --- a/tests/WSSecurity/XML/auth/ValueGreaterThanOrEqualTest.php +++ b/tests/WSSecurity/XML/auth/ValueGreaterThanOrEqualTest.php @@ -69,20 +69,4 @@ public function testMarshalling(): void strval($valueGreaterThanOrEqual), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueGreaterThanOrEqual from XML. - */ - public function testUnmarshalling(): void - { - $valueGreaterThanOrEqual = ValueGreaterThanOrEqual::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueGreaterThanOrEqual), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueGreaterThanTest.php b/tests/WSSecurity/XML/auth/ValueGreaterThanTest.php index 7a10c616..ab0e378f 100644 --- a/tests/WSSecurity/XML/auth/ValueGreaterThanTest.php +++ b/tests/WSSecurity/XML/auth/ValueGreaterThanTest.php @@ -69,20 +69,4 @@ public function testMarshalling(): void strval($valueGreaterThan), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueGreaterThan from XML. - */ - public function testUnmarshalling(): void - { - $valueGreaterThan = ValueGreaterThan::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueGreaterThan), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueInRangenTest.php b/tests/WSSecurity/XML/auth/ValueInRangenTest.php index cf9c8a2a..fd20fd55 100644 --- a/tests/WSSecurity/XML/auth/ValueInRangenTest.php +++ b/tests/WSSecurity/XML/auth/ValueInRangenTest.php @@ -73,20 +73,4 @@ public function testMarshalling(): void strval($valueInRangen), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueInRangen from XML. - */ - public function testUnmarshalling(): void - { - $valueInRangen = ValueInRangen::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueInRangen), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueLessThanOrEqualTest.php b/tests/WSSecurity/XML/auth/ValueLessThanOrEqualTest.php index c6eec2b0..f66052cd 100644 --- a/tests/WSSecurity/XML/auth/ValueLessThanOrEqualTest.php +++ b/tests/WSSecurity/XML/auth/ValueLessThanOrEqualTest.php @@ -69,20 +69,4 @@ public function testMarshalling(): void strval($valueLessThanOrEqual), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueLessThanOrEqual from XML. - */ - public function testUnmarshalling(): void - { - $valueLessThanOrEqual = ValueLessThanOrEqual::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueLessThanOrEqual), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueLessThanTest.php b/tests/WSSecurity/XML/auth/ValueLessThanTest.php index 9d7e79f2..f3bd069c 100644 --- a/tests/WSSecurity/XML/auth/ValueLessThanTest.php +++ b/tests/WSSecurity/XML/auth/ValueLessThanTest.php @@ -69,20 +69,4 @@ public function testMarshalling(): void strval($valueLessThan), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueLessThan from XML. - */ - public function testUnmarshalling(): void - { - $valueLessThan = ValueLessThan::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueLessThan), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueLowerBoundTest.php b/tests/WSSecurity/XML/auth/ValueLowerBoundTest.php index 787b53ab..76b232ce 100644 --- a/tests/WSSecurity/XML/auth/ValueLowerBoundTest.php +++ b/tests/WSSecurity/XML/auth/ValueLowerBoundTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($valueLowerBound), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueLowerBound from XML. - */ - public function testUnmarshalling(): void - { - $valueLowerBound = ValueLowerBound::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueLowerBound), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueOneOfWithStructuredValuesTest.php b/tests/WSSecurity/XML/auth/ValueOneOfWithStructuredValuesTest.php index 6c270268..005649d1 100644 --- a/tests/WSSecurity/XML/auth/ValueOneOfWithStructuredValuesTest.php +++ b/tests/WSSecurity/XML/auth/ValueOneOfWithStructuredValuesTest.php @@ -77,20 +77,4 @@ public function testMarshalling(): void strval($valueOneOf), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueOneOf from XML. - */ - public function testUnmarshalling(): void - { - $valueOneOf = ValueOneOf::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueOneOf), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueOneOfWithValuesTest.php b/tests/WSSecurity/XML/auth/ValueOneOfWithValuesTest.php index 154949d0..10d6480f 100644 --- a/tests/WSSecurity/XML/auth/ValueOneOfWithValuesTest.php +++ b/tests/WSSecurity/XML/auth/ValueOneOfWithValuesTest.php @@ -58,20 +58,4 @@ public function testMarshalling(): void strval($valueOneOf), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueOneOf from XML. - */ - public function testUnmarshalling(): void - { - $valueOneOf = ValueOneOf::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueOneOf), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueTest.php b/tests/WSSecurity/XML/auth/ValueTest.php index d82a4493..1fda130c 100644 --- a/tests/WSSecurity/XML/auth/ValueTest.php +++ b/tests/WSSecurity/XML/auth/ValueTest.php @@ -54,20 +54,4 @@ public function testMarshalling(): void strval($value), ); } - - - // test unmarshalling - - - /** - * Test creating a Value from XML. - */ - public function testUnmarshalling(): void - { - $value = Value::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($value), - ); - } } diff --git a/tests/WSSecurity/XML/auth/ValueUpperBoundTest.php b/tests/WSSecurity/XML/auth/ValueUpperBoundTest.php index 39bf35b8..6a7865a4 100644 --- a/tests/WSSecurity/XML/auth/ValueUpperBoundTest.php +++ b/tests/WSSecurity/XML/auth/ValueUpperBoundTest.php @@ -69,20 +69,4 @@ public function testMarshalling(): void strval($valueUpperBound), ); } - - - // test unmarshalling - - - /** - * Test creating a ValueUpperBound from XML. - */ - public function testUnmarshalling(): void - { - $valueUpperBound = ValueUpperBound::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($valueUpperBound), - ); - } } diff --git a/tests/WSSecurity/XML/fed/ApplicationServiceEndpointTest.php b/tests/WSSecurity/XML/fed/ApplicationServiceEndpointTest.php index 1ebe7327..b091e5ad 100644 --- a/tests/WSSecurity/XML/fed/ApplicationServiceEndpointTest.php +++ b/tests/WSSecurity/XML/fed/ApplicationServiceEndpointTest.php @@ -111,20 +111,4 @@ public function testMarshalling(): void strval($applicationServiceEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a ApplicationServiceEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $applicationServiceEndpoint = ApplicationServiceEndpoint::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($applicationServiceEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/AttributeServiceEndpointTest.php b/tests/WSSecurity/XML/fed/AttributeServiceEndpointTest.php index 352a7ac8..a938f15d 100644 --- a/tests/WSSecurity/XML/fed/AttributeServiceEndpointTest.php +++ b/tests/WSSecurity/XML/fed/AttributeServiceEndpointTest.php @@ -111,20 +111,4 @@ public function testMarshalling(): void strval($attributeServiceEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a AttributeServiceEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $attributeServiceEndpoint = AttributeServiceEndpoint::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($attributeServiceEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/ClaimDialectTest.php b/tests/WSSecurity/XML/fed/ClaimDialectTest.php index e4f9a91b..f25890e3 100644 --- a/tests/WSSecurity/XML/fed/ClaimDialectTest.php +++ b/tests/WSSecurity/XML/fed/ClaimDialectTest.php @@ -75,20 +75,4 @@ public function testMarshallingEmpty(): void $this->expectException(AssertionFailedException::class); new ClaimDialect(); } - - - // test unmarshalling - - - /** - * Test creating a ClaimDialect from XML. - */ - public function testUnmarshalling(): void - { - $claimDialect = ClaimDialect::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($claimDialect), - ); - } } diff --git a/tests/WSSecurity/XML/fed/ClaimDialectsOfferedTest.php b/tests/WSSecurity/XML/fed/ClaimDialectsOfferedTest.php index 09dadf44..40a0c9ce 100644 --- a/tests/WSSecurity/XML/fed/ClaimDialectsOfferedTest.php +++ b/tests/WSSecurity/XML/fed/ClaimDialectsOfferedTest.php @@ -76,20 +76,4 @@ public function testMarshalling(): void strval($claimDialectsOffered), ); } - - - // test unmarshalling - - - /** - * Test creating a ClaimDialectsOffered from XML. - */ - public function testUnmarshalling(): void - { - $claimDialectsOffered = ClaimDialectsOffered::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($claimDialectsOffered), - ); - } } diff --git a/tests/WSSecurity/XML/fed/IssuerNameTest.php b/tests/WSSecurity/XML/fed/IssuerNameTest.php index 3a7c33d0..886f1ce7 100644 --- a/tests/WSSecurity/XML/fed/IssuerNameTest.php +++ b/tests/WSSecurity/XML/fed/IssuerNameTest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($issuerName), ); } - - - // test unmarshalling - - - /** - * Test creating a IssuerName from XML. - */ - public function testUnmarshalling(): void - { - $issuerName = IssuerName::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($issuerName), - ); - } } diff --git a/tests/WSSecurity/XML/fed/LogicalServiceNamesOfferedTest.php b/tests/WSSecurity/XML/fed/LogicalServiceNamesOfferedTest.php index 3b3e1189..22ef9b59 100644 --- a/tests/WSSecurity/XML/fed/LogicalServiceNamesOfferedTest.php +++ b/tests/WSSecurity/XML/fed/LogicalServiceNamesOfferedTest.php @@ -72,23 +72,4 @@ public function testMarshalling(): void strval($logicalServiceNamesOffered), ); } - - - // test unmarshalling - - - /** - * Test creating a LogicalServiceNamesOffered from XML. - */ - public function testUnmarshalling(): void - { - $logicalServiceNamesOffered = LogicalServiceNamesOffered::fromXML( - self::$xmlRepresentation->documentElement, - ); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($logicalServiceNamesOffered), - ); - } } diff --git a/tests/WSSecurity/XML/fed/PassiveRequestorEndpointTest.php b/tests/WSSecurity/XML/fed/PassiveRequestorEndpointTest.php index dcd216da..04d7ac34 100644 --- a/tests/WSSecurity/XML/fed/PassiveRequestorEndpointTest.php +++ b/tests/WSSecurity/XML/fed/PassiveRequestorEndpointTest.php @@ -111,23 +111,4 @@ public function testMarshalling(): void strval($passiveRequestorEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a PassiveRequestorEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $passiveRequestorEndpoint = PassiveRequestorEndpoint::fromXML( - self::$xmlRepresentation->documentElement, - ); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($passiveRequestorEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/PsuedonymServiceEndpointsTest.php b/tests/WSSecurity/XML/fed/PsuedonymServiceEndpointsTest.php index 5906f857..f660b2d6 100644 --- a/tests/WSSecurity/XML/fed/PsuedonymServiceEndpointsTest.php +++ b/tests/WSSecurity/XML/fed/PsuedonymServiceEndpointsTest.php @@ -111,20 +111,4 @@ public function testMarshalling(): void strval($psuedonymServiceEndpoints), ); } - - - // test unmarshalling - - - /** - * Test creating a PsuedonymServiceEndpoints from XML. - */ - public function testUnmarshalling(): void - { - $psuedonymServiceEndpoints = PsuedonymServiceEndpoints::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($psuedonymServiceEndpoints), - ); - } } diff --git a/tests/WSSecurity/XML/fed/SecurityTokenServiceEndpointTest.php b/tests/WSSecurity/XML/fed/SecurityTokenServiceEndpointTest.php index a1b01b94..a5b7ce59 100644 --- a/tests/WSSecurity/XML/fed/SecurityTokenServiceEndpointTest.php +++ b/tests/WSSecurity/XML/fed/SecurityTokenServiceEndpointTest.php @@ -111,23 +111,4 @@ public function testMarshalling(): void strval($securityTokenServiceEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a SecurityTokenServiceEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $securityTokenServiceEndpoint = SecurityTokenServiceEndpoint::fromXML( - self::$xmlRepresentation->documentElement, - ); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($securityTokenServiceEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/SingleSignOutNotificationEndpointTest.php b/tests/WSSecurity/XML/fed/SingleSignOutNotificationEndpointTest.php index 171257a6..6412f7ce 100644 --- a/tests/WSSecurity/XML/fed/SingleSignOutNotificationEndpointTest.php +++ b/tests/WSSecurity/XML/fed/SingleSignOutNotificationEndpointTest.php @@ -111,23 +111,4 @@ public function testMarshalling(): void strval($singleSignOutNotificationEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a SingleSignOutSubscriptionEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $singleSignOutNotificationEndpoint = SingleSignOutNotificationEndpoint::fromXML( - self::$xmlRepresentation->documentElement, - ); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($singleSignOutNotificationEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/SingleSignOutSubscriptionEndpointTest.php b/tests/WSSecurity/XML/fed/SingleSignOutSubscriptionEndpointTest.php index f3389c61..f24013e8 100644 --- a/tests/WSSecurity/XML/fed/SingleSignOutSubscriptionEndpointTest.php +++ b/tests/WSSecurity/XML/fed/SingleSignOutSubscriptionEndpointTest.php @@ -111,23 +111,4 @@ public function testMarshalling(): void strval($singleSignOutSubscriptionEndpoint), ); } - - - // test unmarshalling - - - /** - * Test creating a SingleSignOutSubscriptionEndpoint from XML. - */ - public function testUnmarshalling(): void - { - $singleSignOutSubscriptionEndpoint = SingleSignOutSubscriptionEndpoint::fromXML( - self::$xmlRepresentation->documentElement, - ); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($singleSignOutSubscriptionEndpoint), - ); - } } diff --git a/tests/WSSecurity/XML/fed/TargetScopesTest.php b/tests/WSSecurity/XML/fed/TargetScopesTest.php index 7d0dc502..fa922ec5 100644 --- a/tests/WSSecurity/XML/fed/TargetScopesTest.php +++ b/tests/WSSecurity/XML/fed/TargetScopesTest.php @@ -111,20 +111,4 @@ public function testMarshalling(): void strval($targetScopes), ); } - - - // test unmarshalling - - - /** - * Test creating a TargetScopes from XML. - */ - public function testUnmarshalling(): void - { - $targetScopes = TargetScopes::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($targetScopes), - ); - } } diff --git a/tests/WSSecurity/XML/fed/TokenTypeTest.php b/tests/WSSecurity/XML/fed/TokenTypeTest.php index b44f05c1..062bdb2c 100644 --- a/tests/WSSecurity/XML/fed/TokenTypeTest.php +++ b/tests/WSSecurity/XML/fed/TokenTypeTest.php @@ -75,20 +75,4 @@ public function testMarshallingEmpty(): void $this->expectException(AssertionFailedException::class); new TokenType(); } - - - // test unmarshalling - - - /** - * Test creating a TokenType from XML. - */ - public function testUnmarshalling(): void - { - $tokenType = TokenType::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($tokenType), - ); - } } diff --git a/tests/WSSecurity/XML/fed/TokenTypesOfferedTest.php b/tests/WSSecurity/XML/fed/TokenTypesOfferedTest.php index 4e88f9e2..f49f31db 100644 --- a/tests/WSSecurity/XML/fed/TokenTypesOfferedTest.php +++ b/tests/WSSecurity/XML/fed/TokenTypesOfferedTest.php @@ -80,20 +80,4 @@ public function testMarshalling(): void strval($tokenTypesOffered), ); } - - - // test unmarshalling - - - /** - * Test creating a TokenTypesOffered from XML. - */ - public function testUnmarshalling(): void - { - $tokenTypesOffered = TokenTypesOffered::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($tokenTypesOffered), - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ActionTest.php b/tests/WSSecurity/XML/wsa/ActionTest.php index be14cb52..3cebced9 100644 --- a/tests/WSSecurity/XML/wsa/ActionTest.php +++ b/tests/WSSecurity/XML/wsa/ActionTest.php @@ -61,20 +61,4 @@ public function testMarshalling(): void strval($action) ); } - - - // test unmarshalling - - - /** - * Test creating a Action from XML. - */ - public function testUnmarshalling(): void - { - $action = Action::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($action) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/AddressTest.php b/tests/WSSecurity/XML/wsa/AddressTest.php index 934ec127..335082fd 100644 --- a/tests/WSSecurity/XML/wsa/AddressTest.php +++ b/tests/WSSecurity/XML/wsa/AddressTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($address) ); } - - - // test unmarshalling - - - /** - * Test creating a Address from XML. - */ - public function testUnmarshalling(): void - { - $address = Address::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($address) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/EndpointReferenceTest.php b/tests/WSSecurity/XML/wsa/EndpointReferenceTest.php index f8d26584..5c497653 100644 --- a/tests/WSSecurity/XML/wsa/EndpointReferenceTest.php +++ b/tests/WSSecurity/XML/wsa/EndpointReferenceTest.php @@ -101,20 +101,4 @@ public function testMarshalling(): void strval($endpointReference) ); } - - - // test unmarshalling - - - /** - * Test creating a EndpointReference from XML. - */ - public function testUnmarshalling(): void - { - $endpointReference = EndpointReference::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($endpointReference) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/FaultToTest.php b/tests/WSSecurity/XML/wsa/FaultToTest.php index 2e7e2b4c..a47d6e11 100644 --- a/tests/WSSecurity/XML/wsa/FaultToTest.php +++ b/tests/WSSecurity/XML/wsa/FaultToTest.php @@ -104,20 +104,4 @@ public function testMarshalling(): void strval($faultTo) ); } - - - // test unmarshalling - - - /** - * Test creating a FaultTo from XML. - */ - public function testUnmarshalling(): void - { - $faultTo = FaultTo::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($faultTo) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/FromTest.php b/tests/WSSecurity/XML/wsa/FromTest.php index 9d262975..b124f641 100644 --- a/tests/WSSecurity/XML/wsa/FromTest.php +++ b/tests/WSSecurity/XML/wsa/FromTest.php @@ -104,20 +104,4 @@ public function testMarshalling(): void strval($from) ); } - - - // test unmarshalling - - - /** - * Test creating a From from XML. - */ - public function testUnmarshalling(): void - { - $from = From::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($from) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/MessageIDTest.php b/tests/WSSecurity/XML/wsa/MessageIDTest.php index 626ed30f..75aa4060 100644 --- a/tests/WSSecurity/XML/wsa/MessageIDTest.php +++ b/tests/WSSecurity/XML/wsa/MessageIDTest.php @@ -61,20 +61,4 @@ public function testMarshalling(): void strval($msgId) ); } - - - // test unmarshalling - - - /** - * Test creating a MessageID from XML. - */ - public function testUnmarshalling(): void - { - $msgId = MessageID::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($msgId) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/MetadataTest.php b/tests/WSSecurity/XML/wsa/MetadataTest.php index 16689dcb..c669041b 100644 --- a/tests/WSSecurity/XML/wsa/MetadataTest.php +++ b/tests/WSSecurity/XML/wsa/MetadataTest.php @@ -79,30 +79,4 @@ public function testMarshallingWithNoContent(): void ); $this->assertTrue($metadata->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $metadata = Metadata::fromXML(self::$xmlRepresentation->documentElement); - - $elements = $metadata->getElements(); - $this->assertFalse($metadata->isEmptyElement()); - $this->assertCount(1, $elements); - - $attributes = $metadata->getAttributesNS(); - $this->assertCount(1, $attributes); - - $attribute = array_pop($attributes); - $this->assertEquals( - [ - 'namespaceURI' => 'urn:x-simplesamlphp:namespace', - 'namespacePrefix' => 'ssp', - 'attrName' => 'attr1', - 'attrValue' => 'value1', - ], - $attribute->toArray(), - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ProblemActionTest.php b/tests/WSSecurity/XML/wsa/ProblemActionTest.php index 81d7cb44..546f7703 100644 --- a/tests/WSSecurity/XML/wsa/ProblemActionTest.php +++ b/tests/WSSecurity/XML/wsa/ProblemActionTest.php @@ -83,20 +83,4 @@ public function testMarshallingEmptyElement(): void ); $this->assertTrue($problemAction->isEmptyElement()); } - - - // test unmarshalling - - - /** - * Test creating a ProblemAction from XML. - */ - public function testUnmarshalling(): void - { - $problemAction = ProblemAction::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($problemAction) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ProblemHeaderQNameTest.php b/tests/WSSecurity/XML/wsa/ProblemHeaderQNameTest.php index 6d2d73bd..4fba6267 100644 --- a/tests/WSSecurity/XML/wsa/ProblemHeaderQNameTest.php +++ b/tests/WSSecurity/XML/wsa/ProblemHeaderQNameTest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($problemHeaderQName) ); } - - - // test unmarshalling - - - /** - * Test creating a ProblemHeaderQName from XML. - */ - public function testUnmarshalling(): void - { - $problemHeaderQName = ProblemHeaderQName::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($problemHeaderQName) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ProblemIRITest.php b/tests/WSSecurity/XML/wsa/ProblemIRITest.php index afbc2cf0..4c856bb3 100644 --- a/tests/WSSecurity/XML/wsa/ProblemIRITest.php +++ b/tests/WSSecurity/XML/wsa/ProblemIRITest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($problemIri) ); } - - - // test unmarshalling - - - /** - * Test creating a ProblemIRI from XML. - */ - public function testUnmarshalling(): void - { - $problemIri = ProblemIRI::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($problemIri) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ReferenceParametersTest.php b/tests/WSSecurity/XML/wsa/ReferenceParametersTest.php index 449c972c..1adb605f 100644 --- a/tests/WSSecurity/XML/wsa/ReferenceParametersTest.php +++ b/tests/WSSecurity/XML/wsa/ReferenceParametersTest.php @@ -79,30 +79,4 @@ public function testMarshallingWithNoContent(): void ); $this->assertTrue($referenceParameters->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $referenceParameters = ReferenceParameters::fromXML(self::$xmlRepresentation->documentElement); - - $elements = $referenceParameters->getElements(); - $this->assertFalse($referenceParameters->isEmptyElement()); - $this->assertCount(1, $elements); - - $attributes = $referenceParameters->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/WSSecurity/XML/wsa/RelatesToTest.php b/tests/WSSecurity/XML/wsa/RelatesToTest.php index 3b601520..10d0268b 100644 --- a/tests/WSSecurity/XML/wsa/RelatesToTest.php +++ b/tests/WSSecurity/XML/wsa/RelatesToTest.php @@ -70,28 +70,4 @@ public function testMarshallingWithNoContent(): void ); $this->assertTrue($relatesTo->isEmptyElement()); } - - - /** - */ - public function testUnmarshalling(): void - { - $relatesTo = RelatesTo::fromXML(self::$xmlRepresentation->documentElement); - $this->assertFalse($relatesTo->isEmptyElement()); - $this->assertEquals('http://www.w3.org/2005/08/addressing/reply', $relatesTo->getRelationshipType()); - - $attributes = $relatesTo->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/WSSecurity/XML/wsa/ReplyToTest.php b/tests/WSSecurity/XML/wsa/ReplyToTest.php index ffd847f4..7f9ce856 100644 --- a/tests/WSSecurity/XML/wsa/ReplyToTest.php +++ b/tests/WSSecurity/XML/wsa/ReplyToTest.php @@ -104,20 +104,4 @@ public function testMarshalling(): void strval($replyTo) ); } - - - // test unmarshalling - - - /** - * Test creating a ReplyTo from XML. - */ - public function testUnmarshalling(): void - { - $replyTo = ReplyTo::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($replyTo) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/RetryAfterTest.php b/tests/WSSecurity/XML/wsa/RetryAfterTest.php index 9304b30e..adeed014 100644 --- a/tests/WSSecurity/XML/wsa/RetryAfterTest.php +++ b/tests/WSSecurity/XML/wsa/RetryAfterTest.php @@ -60,21 +60,4 @@ public function testMarshalling(): void strval($retryAfter) ); } - - - // test unmarshalling - - - /** - * Test creating a RetryAfter from XML. - */ - public function testUnmarshalling(): void - { - $RetryAfter = RetryAfter::fromXML(self::$xmlRepresentation->documentElement); - - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($RetryAfter) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/SoapActionTest.php b/tests/WSSecurity/XML/wsa/SoapActionTest.php index 560c4fa9..4deed797 100644 --- a/tests/WSSecurity/XML/wsa/SoapActionTest.php +++ b/tests/WSSecurity/XML/wsa/SoapActionTest.php @@ -54,20 +54,4 @@ public function testMarshalling(): void strval($soapAction) ); } - - - // test unmarshalling - - - /** - * Test creating a SoapAction from XML. - */ - public function testUnmarshalling(): void - { - $soapAction = SoapAction::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($soapAction) - ); - } } diff --git a/tests/WSSecurity/XML/wsa/ToTest.php b/tests/WSSecurity/XML/wsa/ToTest.php index c1d1f285..b3ae99fa 100644 --- a/tests/WSSecurity/XML/wsa/ToTest.php +++ b/tests/WSSecurity/XML/wsa/ToTest.php @@ -62,20 +62,4 @@ public function testMarshalling(): void strval($to) ); } - - - // test unmarshalling - - - /** - * Test creating a To from XML. - */ - public function testUnmarshalling(): void - { - $to = To::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($to) - ); - } } diff --git a/tests/WSSecurity/XML/wsse/BinarySecurityTokenTest.php b/tests/WSSecurity/XML/wsse/BinarySecurityTokenTest.php index f09abca2..884a067c 100644 --- a/tests/WSSecurity/XML/wsse/BinarySecurityTokenTest.php +++ b/tests/WSSecurity/XML/wsse/BinarySecurityTokenTest.php @@ -70,20 +70,4 @@ public function testMarshalling(): void strval($binarySecurityToken), ); } - - - // test unmarshalling - - - /** - * Test creating a BinarySecurityToken from XML. - */ - public function testUnmarshalling(): void - { - $binarySecurityToken = BinarySecurityToken::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($binarySecurityToken), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/EmbeddedTest.php b/tests/WSSecurity/XML/wsse/EmbeddedTest.php index 34636fae..1fcb739c 100644 --- a/tests/WSSecurity/XML/wsse/EmbeddedTest.php +++ b/tests/WSSecurity/XML/wsse/EmbeddedTest.php @@ -79,20 +79,4 @@ public function testMarshallingEmpty(): void $this->assertTrue($embedded->isEmptyElement()); } - - - // test unmarshalling - - - /** - * Test creating a Embedded from XML. - */ - public function testUnmarshalling(): void - { - $embedded = Embedded::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($embedded), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/KeyIdentifierTest.php b/tests/WSSecurity/XML/wsse/KeyIdentifierTest.php index 3974dc25..aac07445 100644 --- a/tests/WSSecurity/XML/wsse/KeyIdentifierTest.php +++ b/tests/WSSecurity/XML/wsse/KeyIdentifierTest.php @@ -70,20 +70,4 @@ public function testMarshalling(): void strval($keyIdentifier), ); } - - - // test unmarshalling - - - /** - * Test creating a KeyIdentifier from XML. - */ - public function testUnmarshalling(): void - { - $keyIdentifier = KeyIdentifier::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($keyIdentifier), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/NonceTest.php b/tests/WSSecurity/XML/wsse/NonceTest.php index 4c851cf2..cb3f7081 100644 --- a/tests/WSSecurity/XML/wsse/NonceTest.php +++ b/tests/WSSecurity/XML/wsse/NonceTest.php @@ -68,20 +68,4 @@ public function testMarshalling(): void strval($nonce), ); } - - - // test unmarshalling - - - /** - * Test creating a BinarySecurityToken from XML. - */ - public function testUnmarshalling(): void - { - $nonce = Nonce::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($nonce), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/PasswordTest.php b/tests/WSSecurity/XML/wsse/PasswordTest.php index c64b23fd..dd55163f 100644 --- a/tests/WSSecurity/XML/wsse/PasswordTest.php +++ b/tests/WSSecurity/XML/wsse/PasswordTest.php @@ -57,20 +57,4 @@ public function testMarshalling(): void strval($password), ); } - - - // test unmarshalling - - - /** - * Test creating a Password from XML. - */ - public function testUnmarshalling(): void - { - $password = Password::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($password), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/ReferenceTest.php b/tests/WSSecurity/XML/wsse/ReferenceTest.php index f9a14ea2..5bc4e1a5 100644 --- a/tests/WSSecurity/XML/wsse/ReferenceTest.php +++ b/tests/WSSecurity/XML/wsse/ReferenceTest.php @@ -65,20 +65,4 @@ public function testMarshalling(): void strval($reference), ); } - - - // test unmarshalling - - - /** - * Test creating a Reference from XML. - */ - public function testUnmarshalling(): void - { - $reference = Reference::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($reference), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/SecurityTokenReferenceTest.php b/tests/WSSecurity/XML/wsse/SecurityTokenReferenceTest.php index 875fdaf5..6cf6bb38 100644 --- a/tests/WSSecurity/XML/wsse/SecurityTokenReferenceTest.php +++ b/tests/WSSecurity/XML/wsse/SecurityTokenReferenceTest.php @@ -80,20 +80,4 @@ public function testMarshallingEmpty(): void $this->assertTrue($securityTokenReference->isEmptyElement()); } - - - // test unmarshalling - - - /** - * Test creating a SecurityTokenReference from XML. - */ - public function testUnmarshalling(): void - { - $securityTokenReference = SecurityTokenReference::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($securityTokenReference), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/TransformationParametersTest.php b/tests/WSSecurity/XML/wsse/TransformationParametersTest.php index 9454a7d3..5159f6a3 100644 --- a/tests/WSSecurity/XML/wsse/TransformationParametersTest.php +++ b/tests/WSSecurity/XML/wsse/TransformationParametersTest.php @@ -78,20 +78,4 @@ public function testMarshallingEmpty(): void $this->assertTrue($transformationParameters->isEmptyElement()); } - - - // test unmarshalling - - - /** - * Test creating a TransformationParameters from XML. - */ - public function testUnmarshalling(): void - { - $transformationParameters = TransformationParameters::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($transformationParameters), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/UsernameTest.php b/tests/WSSecurity/XML/wsse/UsernameTest.php index b7a0b16f..ab7b8729 100644 --- a/tests/WSSecurity/XML/wsse/UsernameTest.php +++ b/tests/WSSecurity/XML/wsse/UsernameTest.php @@ -56,20 +56,4 @@ public function testMarshalling(): void strval($username), ); } - - - // test unmarshalling - - - /** - * Test creating a Username from XML. - */ - public function testUnmarshalling(): void - { - $username = Username::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($username), - ); - } } diff --git a/tests/WSSecurity/XML/wsse/UsernameTokenTest.php b/tests/WSSecurity/XML/wsse/UsernameTokenTest.php index 26e637bb..fc4b8c0e 100644 --- a/tests/WSSecurity/XML/wsse/UsernameTokenTest.php +++ b/tests/WSSecurity/XML/wsse/UsernameTokenTest.php @@ -73,20 +73,4 @@ public function testMarshalling(): void strval($usernameToken), ); } - - - // test unmarshalling - - - /** - * Test creating a UsernameToken from XML. - */ - public function testUnmarshalling(): void - { - $usernameToken = UsernameToken::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($usernameToken), - ); - } } diff --git a/tests/WSSecurity/XML/wsu/CreatedTest.php b/tests/WSSecurity/XML/wsu/CreatedTest.php index 9165b42d..a84e4c73 100644 --- a/tests/WSSecurity/XML/wsu/CreatedTest.php +++ b/tests/WSSecurity/XML/wsu/CreatedTest.php @@ -59,20 +59,4 @@ public function testMarshalling(): void strval($created) ); } - - - // test unmarshalling - - - /** - * Test creating a Created from XML. - */ - public function testUnmarshalling(): void - { - $created = Created::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($created) - ); - } } diff --git a/tests/WSSecurity/XML/wsu/ExpiresTest.php b/tests/WSSecurity/XML/wsu/ExpiresTest.php index 2699caeb..75afc954 100644 --- a/tests/WSSecurity/XML/wsu/ExpiresTest.php +++ b/tests/WSSecurity/XML/wsu/ExpiresTest.php @@ -59,20 +59,4 @@ public function testMarshalling(): void strval($expires) ); } - - - // test unmarshalling - - - /** - * Test creating a Expires from XML. - */ - public function testUnmarshalling(): void - { - $expires = Expires::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($expires) - ); - } } diff --git a/tests/WSSecurity/XML/wsu/TimestampTest.php b/tests/WSSecurity/XML/wsu/TimestampTest.php index d435ce5a..d15369dd 100644 --- a/tests/WSSecurity/XML/wsu/TimestampTest.php +++ b/tests/WSSecurity/XML/wsu/TimestampTest.php @@ -75,20 +75,4 @@ public function testMarshallingEmpty(): void $this->assertTrue($timestamp->isEmptyElement()); } - - - // test unmarshalling - - - /** - * Test creating a Created from XML. - */ - public function testUnmarshalling(): void - { - $timestamp = Timestamp::fromXML(self::$xmlRepresentation->documentElement); - $this->assertEquals( - self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), - strval($timestamp) - ); - } }