public function CssEmbedFilterTest::testCssEmbedDataUri

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/CssEmbedFilterTest.php, line 29

Class

CssEmbedFilterTest
@group integration

Namespace

Assetic\Test\Filter

Code

public function testCssEmbedDataUri() {
  $data = base64_encode(file_get_contents(__DIR__ . '/fixtures/home.png'));
  $asset = new FileAsset(__DIR__ . '/fixtures/cssembed/test.css');
  $asset
    ->load();
  $filter = new CssEmbedFilter($_SERVER['CSSEMBED_JAR']);
  $filter
    ->filterDump($asset);
  $this
    ->assertContains('url(data:image/png;base64,' . $data, $asset
    ->getContent());
}