public function testGifIsSmallerFileSize()
{
$originalSize = filesize($this->testGif);
$command = new GifOptimizerCommand();
$args = array('image_dir' => __DIR__);
try {
$this->getOutputForCommand($command, GifOptimizerCommand::COMMAND_NAME, $args);
} catch (CommandNotFound $e) {
$this->markTestSkipped(sprintf('Gif optimizer tool is not executable'));
}
clearstatcache(true, $this->testGif);
$optimizedSize = filesize($this->testGif);
self::assertLessThanOrEqual($originalSize, $optimizedSize);
}