public function testXmlWithOptions() { $xml = '<foo><bar></bar></foo>'; $document = new Document(); $document->loadXml($xml); $prolog = '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; $this->assertEquals($prolog . '<foo><bar/></foo>', $document->xml()); $this->assertEquals($prolog . '<foo><bar></bar></foo>', $document->xml(LIBXML_NOEMPTYTAG)); }