1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-29 09:47:36 +01:00

Add tests

This commit is contained in:
Oliver Vogel 2024-01-16 08:53:46 +01:00
parent 0ac396b949
commit ede244d252
2 changed files with 21 additions and 1 deletions

View File

@ -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
*/

View File

@ -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()
{