You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Tests/PrettyMinTest.php
+43
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,49 @@ function () {
132
132
</body>
133
133
</html>
134
134
135
+
HTML;
136
+
137
+
$this->assertEquals($expected, $pm->saveHtml());
138
+
}
139
+
140
+
publicfunctiontestIndentWithSpaces()
141
+
{
142
+
$pm = newPrettyMin(['indent_characters' => '']);
143
+
$pm->load($this->getHtmlDocument());
144
+
$pm->indent();
145
+
$expected = <<<HTML
146
+
<!DOCTYPE html>
147
+
<html>
148
+
<head>
149
+
<title>Test</title>
150
+
<script type="text/javascript"></script>
151
+
<script>
152
+
$(document).ready(
153
+
function () {
154
+
if (this && that && a > b) {
155
+
doSomething();
156
+
}
157
+
}
158
+
);
159
+
</script>
160
+
<style>
161
+
body > div {
162
+
border-top: 1px solid green;
163
+
}
164
+
</style>
165
+
</head>
166
+
<body>
167
+
<h1>Test</h1>
168
+
<div class="keep">
169
+
<div class style>
170
+
<p>This is <b>bold</b> Text. And some more text, still in the same paragraph. <strong>Inline tag </strong>whith whitespace at the end but not after.</p>
171
+
<p>This is another paragraph with a <a href>link</a>.</p>
0 commit comments