PHP  
 PHP_7_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/dom/tests/bug76285.phpt ('Bug #76285 DOMDocument::formatOutput attribute sometimes ignored')

Script

1: <?php
2:
3: $dom 
= new DOMDocument();
4:
$dom->formatOutput false;
5:
$html '<div><div><a>test</a></div><div><a>test2</a></div></div>';
6:
$dom->loadHTML($htmlLIBXML_HTML_NOIMPLIED LIBXML_HTML_NODEFDTD);
7:
$rootNode $dom->documentElement;
8:
var_dump($dom->saveHTML($rootNode));
9:
var_dump($dom->saveHTML());
10:
11:
?>
12:

Expected

string(56) "<div><div><a>test</a></div><div><a>test2</a></div></div>"
string(57) "<div><div><a>test</a></div><div><a>test2</a></div></div>
"

Output

Warning: Use of undefined constant LIBXML_HTML_NOIMPLIED - assumed 'LIBXML_HTML_NOIMPLIED' (this will throw an Error in a future version of PHP) in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6

Warning: Use of undefined constant LIBXML_HTML_NODEFDTD - assumed 'LIBXML_HTML_NODEFDTD' (this will throw an Error in a future version of PHP) in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6

Warning: DOMDocument::loadHTML() expects parameter 2 to be int, string given in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6
string(1) "
"
string(1) "
"

Diff

001+ Warning: Use of undefined constant LIBXML_HTML_NOIMPLIED - assumed 'LIBXML_HTML_NOIMPLIED' (this will throw an Error in a future version of PHP) in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6
002+ 
003+ Warning: Use of undefined constant LIBXML_HTML_NODEFDTD - assumed 'LIBXML_HTML_NODEFDTD' (this will throw an Error in a future version of PHP) in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6
004+ 
005+ Warning: DOMDocument::loadHTML() expects parameter 2 to be int, string given in /var/php_gcov/PHP_7_3/ext/dom/tests/bug76285.php on line 6
006+ string(1) "
007+ "
008+ string(1) "
001- string(56) "<div><div><a>test</a></div><div><a>test2</a></div></div>"
002- string(57) "<div><div><a>test</a></div><div><a>test2</a></div></div>

 

Generated at Thu, 14 Nov 2019 02:24:20 +0000 (11 hours ago)

Copyright © 2005-2019 The PHP Group
All rights reserved.