public function testRoot() { $root = new SimpleDOM('<root><child /></root>'); $parent = $root->parentNode(); /** * When asked for the root node's parent, DOM returns the root node itself */ $this->assertTrue($parent instanceof SimpleDOM); $this->assertSame(dom_import_simplexml($root), dom_import_simplexml($parent)); }