1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-09 05:30:40 +02:00

added option to reset an "empty" image

This commit is contained in:
Oliver Vogel
2013-02-25 20:51:16 +01:00
parent 93d3362265
commit aa4f78b92f
2 changed files with 30 additions and 2 deletions

View File

@@ -290,6 +290,17 @@ class ImageTest extends PHPUnit_Framework_Testcase
$this->assertEquals($img->height, 600);
}
public function testResetEmptyImage()
{
$img = new Image(null, 800, 600);
$img->resize(300, 200);
$img->reset();
$this->assertInternalType('int', $img->width);
$this->assertInternalType('int', $img->height);
$this->assertEquals($img->width, 800);
$this->assertEquals($img->height, 600);
}
public function testSaveImage()
{
$save_as = 'public/test2.jpg';