Beispiel #1
0
 /**
  * @covers ByJG\Util\XmlUtil::getFormattedDocument
  * @todo   Implement testGetFormattedDocument().
  */
 public function testGetFormattedDocument()
 {
     $xml = XmlUtil::createXmlDocumentFromFile(__DIR__ . '/buggy.xml');
     $xml->preserveWhiteSpace = true;
     $xml->formatOutput = false;
     $formatted = XmlUtil::getFormattedDocument($xml);
     $this->assertTrue($xml->preserveWhiteSpace);
     $this->assertFalse($xml->formatOutput);
     $this->assertEquals(self::XMLHEADER . "\n<root>\n  <node>\n    <subnode>value</subnode>\n  </node>\n</root>\n", $formatted);
 }