1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-20 20:51:20 +02:00

added AbstractDecoder tests

This commit is contained in:
Oliver Vogel
2014-06-16 11:46:04 +02:00
parent bbdb310dfa
commit 005999c873

View File

@@ -79,6 +79,16 @@ class AbstractDecoderTest extends PHPUnit_Framework_TestCase
$this->assertFalse($source->isBinary()); $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) public function getTestDecoder($data)
{ {
return $this->getMockForAbstractClass('\Intervention\Image\AbstractDecoder', array($data)); return $this->getMockForAbstractClass('\Intervention\Image\AbstractDecoder', array($data));