mirror of
https://github.com/Intervention/image.git
synced 2025-01-29 09:47:36 +01:00
Add tests
This commit is contained in:
parent
0ac396b949
commit
ede244d252
@ -17,12 +17,12 @@ class File implements FileInterface
|
||||
*/
|
||||
public function __construct(protected string $data)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Save encoded image data in file system
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @param string $filepath
|
||||
* @return void
|
||||
*/
|
||||
|
@ -49,6 +49,16 @@ class ImageManagerTest extends TestCase
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
|
||||
/** @requires extension gd */
|
||||
public function testAnimateGd(): void
|
||||
{
|
||||
$manager = new ImageManager(GdDriver::class);
|
||||
$image = $manager->animate(function ($animation) {
|
||||
$animation->add($this->getTestImagePath('red.gif'), .25);
|
||||
});
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
|
||||
/** @requires extension gd */
|
||||
public function testReadGd()
|
||||
{
|
||||
@ -105,6 +115,16 @@ class ImageManagerTest extends TestCase
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
|
||||
/** @requires extension imagick */
|
||||
public function testAnimateImagick(): void
|
||||
{
|
||||
$manager = new ImageManager(ImagickDriver::class);
|
||||
$image = $manager->animate(function ($animation) {
|
||||
$animation->add($this->getTestImagePath('red.gif'), .25);
|
||||
});
|
||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
||||
}
|
||||
|
||||
/** @requires extension imagick */
|
||||
public function testReadImagick()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user