Exemplo n.º 1
0
 public function testImagickApplyToImage()
 {
     $core = Mockery::mock('\\Imagick');
     $core->shouldReceive('drawimage')->once();
     $image = Mockery::mock('\\Intervention\\Image\\Image');
     $image->shouldReceive('getCore')->once()->andReturn($core);
     $ellipse = new EllipseImagick(250, 150);
     $result = $ellipse->applyToImage($image, 10, 20);
     $this->assertInstanceOf('Intervention\\Image\\Imagick\\Shapes\\EllipseShape', $ellipse);
     $this->assertTrue($result);
 }
Exemplo n.º 2
0
 /**
  * Draw current circle on given image
  *
  * @param  Image   $image
  * @param  integer $x
  * @param  integer $y
  * @return boolean
  */
 public function applyToImage(Image $image, $x = 0, $y = 0)
 {
     return parent::applyToImage($image, $x, $y);
 }