@group integration
Expanded class hierarchy of PngoutFilterTest
class PngoutFilterTest extends BaseImageFilterTest {
private $filter;
protected function setUp() {
if (!isset($_SERVER['PNGOUT_BIN'])) {
$this
->markTestSkipped('No pngout configuration.');
}
$this->filter = new PngoutFilter($_SERVER['PNGOUT_BIN']);
}
/**
* @dataProvider getImages
*/
public function testFilter($image) {
$asset = new FileAsset($image);
$asset
->load();
$before = $asset
->getContent();
$this->filter
->filterDump($asset);
$this
->assertNotEmpty($asset
->getContent(), '->filterLoad() sets content');
$this
->assertNotEquals($before, $asset
->getContent(), '->filterLoad() changes the content');
$this
->assertMimeType('image/png', $asset
->getContent(), '->filterLoad() creates PNG data');
}
public function getImages() {
return array(
array(
__DIR__ . '/fixtures/home.gif',
),
array(
__DIR__ . '/fixtures/home.jpg',
),
array(
__DIR__ . '/fixtures/home.png',
),
);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PngoutFilterTest:: |
public | function | @dataProvider getImages | |
PngoutFilterTest:: |
protected | function | ||
PngoutFilterTest:: |
public | function | ||
PngoutFilterTest:: |
private | property | ||
BaseImageFilterTest:: |
public static | function |