public function OptiPngFilterTest::testFilter

@dataProvider getImages

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/OptiPngFilterTest.php, line 36

Class

OptiPngFilterTest
@group integration

Namespace

Assetic\Test\Filter

Code

public function testFilter($image) {
  $asset = new FileAsset($image);
  $asset
    ->load();
  $before = $asset
    ->getContent();
  $this->filter
    ->filterDump($asset);
  $this
    ->assertNotEmpty($asset
    ->getContent(), '->filterDump() sets content');
  $this
    ->assertNotEquals($before, $asset
    ->getContent(), '->filterDump() changes the content');
  $this
    ->assertMimeType('image/png', $asset
    ->getContent(), '->filterDump() creates PNG data');
}