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

Adds tests

This commit is contained in:
freshleafmedia
2020-11-12 17:28:51 +00:00
parent 9fb8364727
commit 9c1188b4d8

View File

@@ -61,6 +61,18 @@ class EncoderTest extends TestCase
}
}
/**
* @expectedException \Intervention\Image\Exception\NotSupportedException
*/
public function testProcessAvifGd()
{
$core = imagecreatefromjpeg(__DIR__.'/images/test.jpg');
$encoder = new GdEncoder;
$image = Mockery::mock('\Intervention\Image\Image');
$img = $encoder->process($image, 'avif', 90);
$this->assertInstanceOf('Intervention\Image\Image', $img);
}
/**
* @expectedException \Intervention\Image\Exception\NotSupportedException
*/
@@ -180,6 +192,16 @@ class EncoderTest extends TestCase
$img = $encoder->process($image, 'webp', 90);
}
/**
* @expectedException \Intervention\Image\Exception\NotSupportedException
*/
public function testProcessAvifImagick()
{
$encoder = new ImagickEncoder;
$image = Mockery::mock('\Intervention\Image\Image');
$img = $encoder->process($image, 'avif', 90);
}
public function testProcessTiffImagick()
{
$core = $this->getImagickMock('tiff');