Added more tests for resize library
This commit is contained in:
parent
e03e188ba7
commit
614bcbc5b9
1 changed files with 13 additions and 0 deletions
|
@ -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)));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue