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 4a773cb commit 418a50b
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 300 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ext-pcre": "*",

"simplesamlphp/assert": "^1.0",
"simplesamlphp/xml-common": "^1.13"
"simplesamlphp/xml-common": "^1.14"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "^1.5"
Expand Down
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/BodyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,4 @@ public function testMarshallingWithMultipleFaults(): void
[],
);
}


/**
*/
public function testUnmarshalling(): void
{
$body = Body::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($body)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/DetailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,4 @@ public function testMarshallingWithNoContent(): void
);
$this->assertTrue($detail->isEmptyElement());
}


/**
*/
public function testUnmarshalling(): void
{
$detail = Detail::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($detail)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/EnvelopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,4 @@ public function testMarshalling(): void
strval($envelope),
);
}


/**
*/
public function testUnmarshalling(): void
{
$envelope = Envelope::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($envelope),
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/FaultActorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@ public function testMarshalling(): void
strval($faultActor)
);
}


/**
*/
public function testUnmarshalling(): void
{
$faultActor = FaultActor::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($faultActor)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/FaultCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,4 @@ public function testMarshalling(): void
strval($faultCode)
);
}


/**
*/
public function testUnmarshalling(): void
{
$faultCode = FaultCode::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($faultCode)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/FaultStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,4 @@ public function testMarshalling(): void
strval($faultString)
);
}


/**
*/
public function testUnmarshalling(): void
{
$faultString = FaultString::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($faultString)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/FaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,4 @@ public function testMarshalling(): void
strval($fault)
);
}


/**
*/
public function testUnmarshalling(): void
{
$fault = Fault::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($fault)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP11/XML/env/HeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,4 @@ public function testMarshallingWithNoContent(): void
);
$this->assertTrue($header->isEmptyElement());
}


/**
*/
public function testUnmarshalling(): void
{
$header = Header::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($header)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/BodyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,4 @@ public function testMarshallingWithFaultAndContent(): void
[],
);
}


/**
*/
public function testUnmarshalling(): void
{
$body = Body::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($body)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/CodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,4 @@ public function testMarshalling(): void
strval($code)
);
}


/**
*/
public function testUnmarshalling(): void
{
$code = Code::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($code)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/DetailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,4 @@ public function testMarshallingWithNoContent(): void
);
$this->assertTrue($detail->isEmptyElement());
}


/**
*/
public function testUnmarshalling(): void
{
$detail = Detail::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($detail)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/EnvelopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,4 @@ public function testMarshalling(): void
strval($envelope),
);
}


/**
*/
public function testUnmarshalling(): void
{
$envelope = Envelope::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($envelope),
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/FaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,4 @@ public function testMarshalling(): void
strval($fault)
);
}


/**
*/
public function testUnmarshalling(): void
{
$fault = Fault::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($fault)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/HeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,4 @@ public function testMarshallingWithNoContent(): void
);
$this->assertTrue($header->isEmptyElement());
}


/**
*/
public function testUnmarshalling(): void
{
$header = Header::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($header)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@ public function testMarshalling(): void
strval($node)
);
}


/**
*/
public function testUnmarshalling(): void
{
$node = Node::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($node)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/NotUnderstoodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,4 @@ public function testMarshalling(): void
strval($notUnderstood)
);
}


/**
*/
public function testUnmarshalling(): void
{
$notUnderstood = NotUnderstood::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($notUnderstood)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/ReasonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,4 @@ public function testMarshalling(): void
strval($reason)
);
}


/**
*/
public function testUnmarshalling(): void
{
$reason = Reason::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($reason)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/RoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@ public function testMarshalling(): void
strval($role)
);
}


/**
*/
public function testUnmarshalling(): void
{
$role = Role::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($role)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/SubcodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,4 @@ public function testMarshalling(): void
strval($subcode)
);
}


/**
*/
public function testUnmarshalling(): void
{
$subcode = Subcode::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($subcode)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/SupportedEnvelopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,4 @@ public function testMarshalling(): void
strval($supportedEnvelope)
);
}


/**
*/
public function testUnmarshalling(): void
{
$supportedEnvelope = SupportedEnvelope::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($supportedEnvelope)
);
}
}
13 changes: 0 additions & 13 deletions tests/SOAP12/XML/env/TextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@ public function testMarshalling(): void
strval($text)
);
}


/**
*/
public function testUnmarshalling(): void
{
$text = Text::fromXML(self::$xmlRepresentation->documentElement);

$this->assertEquals(
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($text)
);
}
}
Loading

0 comments on commit 418a50b

Please sign in to comment.