From 005999c873a875eddedc84086a0d11db241e3882 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Mon, 16 Jun 2014 11:46:04 +0200 Subject: [PATCH] added AbstractDecoder tests --- tests/AbstractDecoderTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/AbstractDecoderTest.php b/tests/AbstractDecoderTest.php index 2ec8ae9a..5b5991f7 100644 --- a/tests/AbstractDecoderTest.php +++ b/tests/AbstractDecoderTest.php @@ -79,6 +79,16 @@ class AbstractDecoderTest extends PHPUnit_Framework_TestCase $this->assertFalse($source->isBinary()); } + public function testIsInterventionImage() + { + $source = $this->getTestDecoder(1); + $this->assertFalse($source->isInterventionImage()); + + $img = Mockery::mock('Intervention\Image\Image'); + $source = $this->getTestDecoder($img); + $this->assertTrue($source->isInterventionImage()); + } + public function getTestDecoder($data) { return $this->getMockForAbstractClass('\Intervention\Image\AbstractDecoder', array($data));