mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 20:28:21 +01:00
fixed imagick flip command
This commit is contained in:
parent
bf0c03a58e
commit
5078572a9a
@ -10,10 +10,10 @@ class FlipCommand extends \Intervention\Image\Commands\AbstractCommand
|
||||
|
||||
if (in_array(strtolower($mode), array(2, 'v', 'vert', 'vertical'))) {
|
||||
// flip vertical
|
||||
return $image->getCore()->flopImage();
|
||||
return $image->getCore()->flipImage();
|
||||
} else {
|
||||
// flip horizontal
|
||||
return $image->getCore()->flipImage();
|
||||
return $image->getCore()->flopImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class FlipCommandTest extends PHPUnit_Framework_TestCase
|
||||
public function testImagick()
|
||||
{
|
||||
$imagick = Mockery::mock('Imagick');
|
||||
$imagick->shouldReceive('flipimage')->with()->andReturn(true);
|
||||
$imagick->shouldReceive('flopimage')->with()->andReturn(true);
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($imagick);
|
||||
$command = new FlipImagick(array('h'));
|
||||
@ -34,7 +34,7 @@ class FlipCommandTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($result);
|
||||
|
||||
$imagick = Mockery::mock('Imagick');
|
||||
$imagick->shouldReceive('flopimage')->with()->andReturn(true);
|
||||
$imagick->shouldReceive('flipimage')->with()->andReturn(true);
|
||||
$image = Mockery::mock('Intervention\Image\Image');
|
||||
$image->shouldReceive('getCore')->once()->andReturn($imagick);
|
||||
$command = new FlipImagick(array('v'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user