|
@@ 27-37 (lines=11) @@
|
| 24 |
|
$this->assertEquals($expected, $tested); |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
public function testEmbedString() |
| 28 |
|
{ |
| 29 |
|
$origin = file_get_contents(__DIR__.'/rsc/test.css'); |
| 30 |
|
$expected = file_get_contents(__DIR__.'/rsc/expected.css'); |
| 31 |
|
|
| 32 |
|
$cssEmbed = new CssEmbed(); |
| 33 |
|
$cssEmbed->setRootDir(__DIR__.'/rsc'); |
| 34 |
|
$tested = $cssEmbed->embedString($origin); |
| 35 |
|
|
| 36 |
|
$this->assertEquals($expected, $tested); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testMimeTypes() |
| 40 |
|
{ |
|
@@ 39-50 (lines=12) @@
|
| 36 |
|
$this->assertEquals($expected, $tested); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
public function testMimeTypes() |
| 40 |
|
{ |
| 41 |
|
$origin = file_get_contents(__DIR__.'/rsc/test-mime.css'); |
| 42 |
|
$expected = file_get_contents(__DIR__.'/rsc/expected-mime.css'); |
| 43 |
|
|
| 44 |
|
$cssEmbed = new CssEmbed(); |
| 45 |
|
$cssEmbed->setRootDir(__DIR__.'/rsc'); |
| 46 |
|
$cssEmbed->enableEnhancedMimeTypes(); |
| 47 |
|
$tested = $cssEmbed->embedString($origin); |
| 48 |
|
|
| 49 |
|
$this->assertEquals($expected, $tested); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
public function testSetOptions() |
| 53 |
|
{ |
|
@@ 79-89 (lines=11) @@
|
| 76 |
|
$this->assertEquals($expected, $tested); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
public function testHttpEnabledEmbedString() |
| 80 |
|
{ |
| 81 |
|
$origin = file_get_contents(__DIR__.'/rsc/test-http-remote.css'); |
| 82 |
|
$expected = file_get_contents(__DIR__.'/rsc/expected-http-remote.css'); |
| 83 |
|
|
| 84 |
|
$cssEmbed = new CssEmbed(); |
| 85 |
|
$cssEmbed->enableHttp(); |
| 86 |
|
$cssEmbed->setRootDir('//httpbin.org/media/hypothetical-css-dir'); |
| 87 |
|
$tested = $cssEmbed->embedString($origin); |
| 88 |
|
$this->assertEquals($expected, $tested); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
public function testHttpEnabledEnableOptions() |
| 92 |
|
{ |