@group integration
Expanded class hierarchy of JpegtranFilterTest
class JpegtranFilterTest extends BaseImageFilterTest {
private $filter;
protected function setUp() {
if (!isset($_SERVER['JPEGTRAN_BIN'])) {
$this
->markTestSkipped('No jpegtran configuration.');
}
$this->filter = new JpegtranFilter($_SERVER['JPEGTRAN_BIN']);
}
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');
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseImageFilterTest:: |
public static | function | ||
JpegtranFilterTest:: |
private | property | ||
JpegtranFilterTest:: |
protected | function | ||
JpegtranFilterTest:: |
public | function |