Skip to content

Commit 798beba

Browse files
committed
Fix Travis failure due to different formatting (?)
1 parent 382101e commit 798beba

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

ext/dom/tests/gh11288.phpt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ $html = <<<HTML
1010
HTML;
1111

1212
$dom = new DOMDocument();
13+
$dom->formatOutput = true;
1314
$dom->loadHTML($html);
1415

1516
$spans = iterator_to_array($dom->getElementsByTagName('span')->getIterator());
@@ -31,6 +32,7 @@ $html = <<<HTML
3132
HTML;
3233

3334
$dom = new DOMDocument();
35+
$dom->formatOutput = true;
3436
$dom->loadHTML($html);
3537

3638
$spans = iterator_to_array($dom->getElementsByTagName('span')->getIterator());
@@ -50,6 +52,7 @@ $html = <<<HTML
5052
HTML;
5153

5254
$dom = new DOMDocument();
55+
$dom->formatOutput = true;
5356
$dom->loadHTML($html);
5457

5558
$spans = iterator_to_array($dom->getElementsByTagName('span')->getIterator());
@@ -62,18 +65,23 @@ foreach ($spans as $span) {
6265
var_dump($dom->saveHTML());
6366
?>
6467
--EXPECT--
65-
string(112) "<!DOCTYPE HTML>
68+
string(114) "<!DOCTYPE HTML>
6669
<html>
67-
<body><i><span class="foo">Lorem</span></i><span class="foo">ipsum</span>
68-
</body></html>
70+
<body>
71+
<i><span class="foo">Lorem</span></i><span class="foo">ipsum</span>
72+
</body>
73+
</html>
6974
"
70-
string(112) "<!DOCTYPE HTML>
75+
string(114) "<!DOCTYPE HTML>
7176
<html>
72-
<body><i><span class="foo">Lorem</span></i><span class="foo">ipsum</span>
73-
</body></html>
77+
<body>
78+
<i><span class="foo">Lorem</span></i><span class="foo">ipsum</span>
79+
</body>
80+
</html>
7481
"
75-
string(48) "<!DOCTYPE HTML>
82+
string(49) "<!DOCTYPE HTML>
7683
<html>
7784
<body>abc
78-
</body></html>
85+
</body>
86+
</html>
7987
"

ext/dom/tests/gh11289.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $html = <<<HTML
1313
HTML;
1414

1515
$dom = new DOMDocument();
16+
$dom->formatOutput = true;
1617
$dom->loadHTML($html);
1718

1819
$divs = iterator_to_array($dom->getElementsByTagName('div')->getIterator());

ext/dom/tests/gh11290.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ $html = <<<HTML
1212
HTML;
1313

1414
$dom = new DOMDocument();
15+
$dom->formatOutput = true;
1516
$dom->loadHTML($html);
1617

1718
$spans = iterator_to_array($dom->getElementsByTagName('span')->getIterator());

0 commit comments

Comments
 (0)