From 2582007a1706533101acc07f0c35212873ef5d44 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 25 May 2014 14:58:32 +0200 Subject: [PATCH] Imagick encoder resolves to getImagesBlob --- src/Intervention/Image/Imagick/Encoder.php | 8 ++++---- tests/EncoderTest.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Intervention/Image/Imagick/Encoder.php b/src/Intervention/Image/Imagick/Encoder.php index 7b73a6e0..764c348c 100644 --- a/src/Intervention/Image/Imagick/Encoder.php +++ b/src/Intervention/Image/Imagick/Encoder.php @@ -25,7 +25,7 @@ class Encoder extends \Intervention\Image\AbstractEncoder $imagick->setCompressionQuality($this->quality); $imagick->setImageCompressionQuality($this->quality); - return (string) $imagick; + return $imagick->getImagesBlob(); } /** @@ -44,7 +44,7 @@ class Encoder extends \Intervention\Image\AbstractEncoder $imagick->setCompression($compression); $imagick->setImageCompression($compression); - return (string) $imagick; + return $imagick->getImagesBlob(); } /** @@ -63,7 +63,7 @@ class Encoder extends \Intervention\Image\AbstractEncoder $imagick->setCompression($compression); $imagick->setImageCompression($compression); - return (string) $imagick; + return $imagick->getImagesBlob(); } /** @@ -84,7 +84,7 @@ class Encoder extends \Intervention\Image\AbstractEncoder $imagick->setCompressionQuality($this->quality); $imagick->setImageCompressionQuality($this->quality); - return (string) $imagick; + return $imagick->getImagesBlob(); } } diff --git a/tests/EncoderTest.php b/tests/EncoderTest.php index 8883513c..bb3db3da 100644 --- a/tests/EncoderTest.php +++ b/tests/EncoderTest.php @@ -168,7 +168,7 @@ class EncoderTest extends PHPUnit_Framework_TestCase $imagick->shouldReceive('setimagebackgroundcolor'); $imagick->shouldReceive('setbackgroundcolor'); $imagick->shouldReceive('mergeimagelayers')->andReturn($imagick); - $imagick->shouldReceive('__toString')->once()->andReturn(sprintf('mock-%s', $type)); + $imagick->shouldReceive('getimagesblob')->once()->andReturn(sprintf('mock-%s', $type)); return $imagick; }