1
0
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:
Oliver Vogel 2014-05-12 18:53:25 +02:00
parent bf0c03a58e
commit 5078572a9a
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}
}
}

View File

@ -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'));