mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 08:40:33 +02:00
Adds tests
This commit is contained in:
@@ -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
|
* @expectedException \Intervention\Image\Exception\NotSupportedException
|
||||||
*/
|
*/
|
||||||
@@ -180,6 +192,16 @@ class EncoderTest extends TestCase
|
|||||||
$img = $encoder->process($image, 'webp', 90);
|
$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()
|
public function testProcessTiffImagick()
|
||||||
{
|
{
|
||||||
$core = $this->getImagickMock('tiff');
|
$core = $this->getImagickMock('tiff');
|
||||||
|
Reference in New Issue
Block a user