public static domdocumentToStringWithoutHeaders ( DOMDocument $dom, $html = false ) | ||
$dom | DOMDocument |
}); }); describe(':domdocumentToHtml()', function () { it('should convert a DOMDocument instance to an HTML string without respecting void and not void tags.', function () { // This is only to analyze a condition (not used) for the code coverage reporter. FluidHelper::domdocumentToHtml((new FluidXml())->dom(), true); }); }); describe(':domdocumentToStringWithoutHeaders()', function () { it('should convert a DOMDocument instance to an XML string without the XML headers (declaration and stylesheets)', function () { $xml = new FluidXml(); $actual = FluidHelper::domdocumentToStringWithoutHeaders($xml->dom()); $expected = "<doc/>"; \assert($actual === $expected, __($actual, $expected)); $xml = new FluidXml('doc', ['stylesheet' => 'x.com/style.xsl']); $actual = FluidHelper::domdocumentToStringWithoutHeaders($xml->dom()); $expected = "<doc/>"; \assert($actual === $expected, __($actual, $expected)); }); }); describe(':domnodelistToString()', function () { it('should convert a DOMNodeList instance to an XML string', function () { $xml = new FluidXml(); $nodes = $xml->dom()->childNodes; $actual = FluidHelper::domnodelistToString($nodes); $expected = "<doc/>"; \assert($actual === $expected, __($actual, $expected)); }); }); describe(':domnodesToString()', function () { it('should convert an array of DOMNode instances to an XML string', function () {