xref: /php-src/ext/dom/tests/bug35673.phpt (revision bd9f4fa6)
1--TEST--
2Bug #35673 (formatOutput does not work with saveHTML).
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$html = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8<title>This is the title</title></head></html>';
9
10$htmldoc = new DOMDocument();
11$htmldoc->loadHTML($html);
12$htmldoc->formatOutput = true;
13echo $htmldoc->saveHTML();
14?>
15--EXPECT--
16<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
17<html><head>
18<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
19<title>This is the title</title>
20</head></html>
21