HtmlCommentsRemoverTest::testHtmlCommentsRemover()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 16
rs 10
1
<?php
2
3
namespace gulch\Minify\Tests;
4
5
use gulch\Minify\Minifier;
6
use gulch\Minify\Processor\HtmlCommentsRemover;
7
use PHPUnit\Framework\TestCase;
8
9
class HtmlCommentsRemoverTest extends TestCase
10
{
11
    /** @test */
12
    public function testHtmlCommentsRemover()
13
    {
14
        $minifier = new Minifier(new HtmlCommentsRemover);
15
16
        $source = '<!--[if IE]>
17
                       <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
18
                   <![endif]-->
19
                   <!-- HTML Comment -->';
20
21
        $result = '<!--[if IE]>
22
                       <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
23
                   <![endif]-->';
24
25
        $this->assertSame(
26
            $result,
27
            $minifier->process($source)
28
        );
29
    }
30
}
31