Skip to content

Commit

Permalink
Raise coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Oct 7, 2024
1 parent 2b628ca commit c86642c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/XML/soap12/AbstractHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static function fromXML(DOMElement $xml): static
*/
public function toXML(DOMElement $parent = null): DOMElement
{
$e = $this->instantiateParentElement($parent);
$e = parent::toXML($parent);

$e->setAttribute('message', $this->getMessage());
$e->setAttribute('parts', $this->getParts());
Expand Down
4 changes: 2 additions & 2 deletions src/XML/soap12/AbstractOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public function toXML(DOMElement $parent = null): DOMElement
$e->setAttribute('soapAction', $this->getSoapAction());
}

if ($this->getSoapAction() !== null) {
$e->setAttribute('soapActionRequired', $this->getSoapAction() ? 'true' : 'false');
if ($this->getSoapActionRequired() !== null) {
$e->setAttribute('soapActionRequired', $this->getSoapActionRequired() ? 'true' : 'false');
}

if ($this->getStyle() !== null) {
Expand Down
2 changes: 2 additions & 0 deletions tests/WSDL/XML/soap12/BindingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ public function testMarshalling(): void
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($binding),
);

$this->assertFalse($binding->isEmptyElement());
}
}
2 changes: 2 additions & 0 deletions tests/WSDL/XML/soap12/BodyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,7 @@ public function testMarshalling(): void
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($body),
);

$this->assertFalse($body->isEmptyElement());
}
}
1 change: 1 addition & 0 deletions tests/WSDL/XML/soap12/HeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function testMarshalling(): void
[$headerFault],
'urn:x-simplesamlphp:coding',
'urn:x-simplesamlphp:namespace',
true,
);

$this->assertEquals(
Expand Down
2 changes: 2 additions & 0 deletions tests/WSDL/XML/soap12/OperationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ public function testMarshalling(): void
self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement),
strval($operation),
);

$this->assertFalse($operation->isEmptyElement());
}
}
2 changes: 1 addition & 1 deletion tests/resources/xml/soap12/Header.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<soap12:header xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" message="soap12:tOperation" parts="foo bar" use="literal" encodingStyle="urn:x-simplesamlphp:coding" namespace="urn:x-simplesamlphp:namespace">
<soap12:header xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdl:required="true" message="soap12:tOperation" parts="foo bar" use="literal" encodingStyle="urn:x-simplesamlphp:coding" namespace="urn:x-simplesamlphp:namespace">
<soap12:headerfault message="soap12:tOperation" parts="foo bar" use="literal" encodingStyle="urn:x-simplesamlphp:coding" namespace="urn:x-simplesamlphp:namespace"/>
</soap12:header>

0 comments on commit c86642c

Please sign in to comment.