Skip to content

Commit

Permalink
Implement generic version of testUnmarshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Dec 25, 2023
1 parent 8cdb647 commit 07b178c
Show file tree
Hide file tree
Showing 60 changed files with 1 addition and 989 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ClaimTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/DescriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/DisplayNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/DisplayValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/EncryptedValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/StructuredValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueGreaterThanOrEqualTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueGreaterThanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueInRangenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueLessThanOrEqualTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueLessThanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueLowerBoundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueOneOfWithStructuredValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueOneOfWithValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/auth/ValueUpperBoundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/fed/ApplicationServiceEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
16 changes: 0 additions & 16 deletions tests/WSSecurity/XML/fed/AttributeServiceEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}
Loading

0 comments on commit 07b178c

Please sign in to comment.