Code Duplication    Length = 14-17 lines in 2 locations

tests/Tests/CssEmbed/CssEmbedTest.php 2 locations

@@ 52-65 (lines=14) @@
49
        $this->assertEquals($expected, $tested);
50
    }
51
52
    public function testSetOptions()
53
    {
54
        $origin = file_get_contents(__DIR__.'/rsc/test-options.css');
55
        $expected = file_get_contents(__DIR__.'/rsc/expected-options.css');
56
57
        $cssEmbed = new CssEmbed();
58
        $cssEmbed->enableEnhancedMimeTypes();
59
        $cssEmbed->setOptions(CssEmbed::URL_ON_ERROR|CssEmbed::EMBED_FONTS|CssEmbed::EMBED_SVG);
60
        
61
        $cssEmbed->setRootDir(__DIR__.'/rsc');
62
        $tested = $cssEmbed->embedString($origin);
63
64
        $this->assertEquals($expected, $tested);
65
    }
66
67
    public function testHttpEnabledEmbedCss()
68
    { 
@@ 91-107 (lines=17) @@
88
        $this->assertEquals($expected, $tested);
89
    }
90
91
    public function testHttpEnabledEnableOptions()
92
    {
93
        $origin = file_get_contents(__DIR__.'/rsc/test-http-options.css');
94
        $expected = file_get_contents(__DIR__.'/rsc/expected-http-options.css');
95
96
        $cssEmbed = new CssEmbed();
97
98
        $cssEmbed->enableHttp(
99
            true,
100
            CssEmbed::HTTP_DEFAULT_HTTPS|CssEmbed::HTTP_EMBED_SCHEME|CssEmbed::HTTP_EMBED_URL_ONLY
101
        );
102
        $cssEmbed->setRootDir('//httpbin.org/media/hypothetical-css-dir');
103
        $tested = $cssEmbed->embedString($origin);
104
105
        $this->assertEquals($expected, $tested);
106
107
    }
108
}
109
110