public function JpegtranFilterTest::testFilter

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/JpegtranFilterTest.php, line 33

Class

JpegtranFilterTest
@group integration

Namespace

Assetic\Test\Filter

Code

public function testFilter() {
  $asset = new FileAsset(__DIR__ . '/fixtures/home.jpg');
  $asset
    ->load();
  $before = $asset
    ->getContent();
  $this->filter
    ->filterDump($asset);
  $this
    ->assertNotEmpty($asset
    ->getContent(), '->filterLoad() sets content');
  $this
    ->assertNotEquals($before, $asset
    ->getContent(), '->filterDump() changes the content');
  $this
    ->assertMimeType('image/jpeg', $asset
    ->getContent(), '->filterDump() creates JPEG data');
}