public function testNonEmptyRootWithChild() { $root = new SimpleDOM('<root>foo<bar /></root>'); $return = $root->insertText('baz'); $this->assertXmlStringEqualsXmlString('<root>foo<bar />baz</root>', $root->asXML()); $this->assertSame($root, $return); }