diff --git a/Tests/Caster/DOMCasterTest.php b/Tests/Caster/DOMCasterTest.php index 1f952f6..f3f5e88 100644 --- a/Tests/Caster/DOMCasterTest.php +++ b/Tests/Caster/DOMCasterTest.php @@ -170,7 +170,10 @@ public function testCastModernText() ); } - public function testCastAttr() + /** + * @requires PHP < 8.4 + */ + public function testCastAttrPriorToPhp84() { $attr = new \DOMAttr('attr', 'value'); @@ -187,6 +190,26 @@ public function testCastAttr() ); } + /** + * @requires PHP 8.4 + */ + public function testCastAttr() + { + $attr = new \DOMAttr('attr', 'value'); + + $this->assertDumpMatchesFormat(<<<'EODUMP' + DOMAttr {%A + +name: ? string + +specified: ? bool + +value: ? string + +ownerElement: ? ?DOMElement + +schemaTypeInfo: ? mixed + } + EODUMP, + $attr + ); + } + /** * @requires PHP 8.4 */ @@ -199,7 +222,7 @@ public function testCastModernAttr() +name: ? string +value: ? string +ownerElement: ? ?Dom\Element - +specified: true + +specified: ? bool } EODUMP, $attr