PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` shouldReceive('getCore')->once()->andReturn($resource); $image->shouldReceive('getWidth')->once()->andReturn(800); $image->shouldReceive('getHeight')->once()->andReturn(600); $command = new FillGd(array('666666')); $result = $command->execute($image); $this->assertTrue($result); } public function testGdFillWithCoordinates() { $driver = Mockery::mock('\Intervention\Image\Gd\Driver'); $resource = imagecreatefromjpeg(__DIR__.'/images/test.jpg'); $image = Mockery::mock('Intervention\Image\Image'); $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); } public function testImagickFill() { $imagick = Mockery::mock('Imagick'); $imagick->shouldReceive('drawimage')->once()->andReturn(true); $image = Mockery::mock('Intervention\Image\Image'); $image->shouldReceive('getWidth')->once()->andReturn(800); $image->shouldReceive('getHeight')->once()->andReturn(600); $image->shouldReceive('getCore')->andReturn($imagick); $command = new FillImagick(array('666666')); $result = $command->execute($image); $this->assertTrue($result); } public function testImagickFillWithCoordinates() { $imagick = Mockery::mock('Imagick'); $imagick->shouldReceive('getimagepixelcolor')->once()->andReturn('#000000'); $imagick->shouldReceive('transparentpaintimage')->once()->andReturn(true); $imagick->shouldReceive('compositeimage')->times(3)->andReturn(true); $image = Mockery::mock('Intervention\Image\Image'); $image->shouldReceive('getCore')->andReturn($imagick); $image->shouldReceive('getWidth')->andReturn(800); $image->shouldReceive('getHeight')->andReturn(600); $command = new FillImagick(array('666666', 0, 0)); $result = $command->execute($image); $this->assertTrue($result); } }