Skip to content

Commit

Permalink
[+]: add one more test | for issue #16
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Dec 29, 2017
1 parent 8b64c2c commit c402ea8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"require": {
"php": ">=7.0.0",
"voku/simple_html_dom": "~4.1"
"voku/simple_html_dom": "^4.1.3"
},
"require-dev": {
"phpunit/phpunit": "~6.0"
Expand Down
14 changes: 14 additions & 0 deletions tests/HtmlMinTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,20 @@ public function testDoNotAddSpacesViaDoRemoveWhitespaceAroundTags()
str_replace(["\r\n", "\r", "\n"], "\n", $expected),
str_replace(["\r\n", "\r", "\n"], "\n", $htmlMin->minify($html))
);

// ---

$html = ' <span>foo</span>
<a href="bar">baz</a>
<span>bat</span>
';

$expected = '<span>foo</span> <a href=bar>baz</a> <span>bat</span>';

self::assertSame(
str_replace(["\r\n", "\r", "\n"], "\n", $expected),
str_replace(["\r\n", "\r", "\n"], "\n", $htmlMin->minify($html))
);
}

public function testMinifyCodeTag()
Expand Down

0 comments on commit c402ea8

Please sign in to comment.