mirror of
https://github.com/Intervention/image.git
synced 2025-08-24 14:32:52 +02:00
fixes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use Intervention\Image\Commands\ChecksumCommand;
|
||||
|
||||
class ExifCommandTest extends PHPUnit_Framework_TestCase
|
||||
class ChecksumCommandTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function tearDown()
|
||||
{
|
||||
|
@@ -24,12 +24,15 @@ class FillCommandTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGdFillWithCoordinates()
|
||||
{
|
||||
$driver = Mockery::mock('\Intervention\Image\Gd\Driver');
|
||||
$resource = imagecreatefromjpeg(__DIR__.'/images/test.jpg');
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($resource);
|
||||
$image->shouldReceive('getDriver')->once()->andReturn($driver);
|
||||
$image->shouldReceive('getCore')->times(2)->andReturn($resource);
|
||||
$image->shouldReceive('getWidth')->once()->andReturn(800);
|
||||
$image->shouldReceive('getHeight')->once()->andReturn(600);
|
||||
$image->shouldReceive('setCore')->once();
|
||||
$driver->shouldReceive('newImage')->with(800, 600)->once()->andReturn($image);
|
||||
$command = new FillGd(array('#666666', 0, 0));
|
||||
$result = $command->execute($image);
|
||||
$this->assertTrue($result);
|
||||
|
@@ -14,7 +14,7 @@ class PickColorCommandTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$resource = imagecreatefromjpeg(__DIR__.'/images/test.jpg');
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($resource);
|
||||
$image->shouldReceive('getCore')->times(2)->andReturn($resource);
|
||||
$command = new PickColorGd(array());
|
||||
$result = $command->execute($image);
|
||||
$this->assertTrue($result);
|
||||
@@ -27,7 +27,7 @@ class PickColorCommandTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$resource = imagecreatefromjpeg(__DIR__.'/images/test.jpg');
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($resource);
|
||||
$image->shouldReceive('getCore')->times(2)->andReturn($resource);
|
||||
$command = new PickColorGd(array(1, 2));
|
||||
$result = $command->execute($image);
|
||||
$this->assertTrue($result);
|
||||
@@ -40,7 +40,7 @@ class PickColorCommandTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$resource = imagecreatefromjpeg(__DIR__.'/images/test.jpg');
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($resource);
|
||||
$image->shouldReceive('getCore')->times(2)->andReturn($resource);
|
||||
$command = new PickColorGd(array(1, 2, 'hex'));
|
||||
$result = $command->execute($image);
|
||||
$this->assertTrue($result);
|
||||
|
Reference in New Issue
Block a user