1
0
Fork 0
mirror of synced 2024-06-26 10:10:57 +12:00

Added more tests for resize library

This commit is contained in:
Eldad Fux 2019-12-28 14:51:27 +02:00
parent e03e188ba7
commit 614bcbc5b9

View file

@ -129,4 +129,17 @@ class ResizeTest extends TestCase
\unlink($target);
}
public function testCrop100x100Output()
{
$resize = new Resize(\file_get_contents(__DIR__ . '/../../resources/disk-a/kitten-1.jpg'));
$original = __DIR__.'/../../resources/resize/100x100.jpg';
$resize->crop(100, 100);
$result = $resize->output('jpg', 100);
$this->assertEquals(!empty($result), true);
$this->assertEquals(\md5($result), \md5(\file_get_contents($original)));
}
}