mirror of
https://github.com/Intervention/image.git
synced 2025-08-12 17:03:59 +02:00
Add tests
This commit is contained in:
@@ -17,12 +17,12 @@ class File implements FileInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct(protected string $data)
|
public function __construct(protected string $data)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save encoded image data in file system
|
* Save encoded image data in file system
|
||||||
*
|
*
|
||||||
|
* @codeCoverageIgnore
|
||||||
* @param string $filepath
|
* @param string $filepath
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@@ -49,6 +49,16 @@ class ImageManagerTest extends TestCase
|
|||||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
$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 */
|
/** @requires extension gd */
|
||||||
public function testReadGd()
|
public function testReadGd()
|
||||||
{
|
{
|
||||||
@@ -105,6 +115,16 @@ class ImageManagerTest extends TestCase
|
|||||||
$this->assertInstanceOf(ImageInterface::class, $image);
|
$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 */
|
/** @requires extension imagick */
|
||||||
public function testReadImagick()
|
public function testReadImagick()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user