1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-09 21:50:47 +02:00

added Image::basePath()

This commit is contained in:
Oliver Vogel
2014-08-21 20:33:25 +02:00
parent 0d6d0ab312
commit a912b12ede
2 changed files with 30 additions and 1 deletions

View File

@@ -57,6 +57,12 @@ class ImageTest extends PHPUnit_Framework_TestCase
$this->assertEquals('image/png', $image->mime());
}
public function testBasePath()
{
$image = $this->getTestImage();
$this->assertEquals('./tmp/foo.png', $image->basePath());
}
private function getTestImage()
{
$size = Mockery::mock('\Intervention\Image\Size', array(800, 600));
@@ -67,6 +73,8 @@ class ImageTest extends PHPUnit_Framework_TestCase
$driver->shouldReceive('executeCommand')->andReturn($command);
$image = new Image($driver, 'mock');
$image->mime = 'image/png';
$image->dirname = './tmp';
$image->basename = 'foo.png';
return $image;
}