diff --git a/tests/Parser/XmlPluginTest.php b/tests/Parser/XmlPluginTest.php index 18e4f9757..c01e0bd68 100644 --- a/tests/Parser/XmlPluginTest.php +++ b/tests/Parser/XmlPluginTest.php @@ -27,7 +27,7 @@ namespace Kint\Test\Parser; -use DOM\XMLElement; +use DOM\Element; use DOMElement; use Kint\Parser\Parser; use Kint\Parser\XmlPlugin; @@ -106,7 +106,8 @@ public function testParseDOMDocument() $this->assertInstanceOf(InstanceValue::class, $r->contents); $this->assertSame(DOMElement::class, $r->contents->classname); $this->assertSame('x', $r->contents->name); - $this->assertSame(1, $r->contents->size); + // Since PHP 8.1 there's a new schemaTypeInfo property that parses normally + $this->assertSame(KINT_PHP81 ? 1 : 0, $r->contents->size); $this->assertSame('(function($s){$x = new \\DomDocument(); $x->loadXML($s); return $x;})($v)->firstChild', $r->contents->access_path); $v = self::TEST_XML_INVALID; @@ -144,7 +145,7 @@ public function testParseXMLDocument() $this->assertNotNull($r); $this->assertInstanceOf(InstanceValue::class, $r->contents); - $this->assertSame(XMLElement::class, $r->contents->classname); + $this->assertSame(Element::class, $r->contents->classname); $this->assertSame('x', $r->contents->name); $this->assertSame(2, $r->contents->size); $this->assertSame('\\DOM\\XMLDocument::createFromString($v)->firstChild', $r->contents->access_path);