php-src/ext/dom/tests/bug76285.phpt
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

23 lines
651 B
PHP

--TEST--
Bug #76285 DOMDocument::formatOutput attribute sometimes ignored
--EXTENSIONS--
dom
--SKIPIF--
<?php if (!defined("LIBXML_HTML_NOIMPLIED")) die("skip libxml2 2.7.7 required"); ?>
--FILE--
<?php
$dom = new DOMDocument();
$dom->formatOutput = false;
$html = '<div><div><a>test</a></div><div><a>test2</a></div></div>';
$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$rootNode = $dom->documentElement;
var_dump($dom->saveHTML($rootNode));
var_dump($dom->saveHTML());
?>
--EXPECT--
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>
"