1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-18 04:38:26 +01:00
intervention_image/tests/Unit/Drivers/Gd/Decoders/SplFileInfoImageDecoderTest.php
2024-05-09 10:38:33 +02:00

30 lines
895 B
PHP

<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Gd\Decoders;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use Intervention\Image\Drivers\Gd\Decoders\SplFileInfoImageDecoder;
use Intervention\Image\Drivers\Gd\Driver;
use Intervention\Image\Image;
use Intervention\Image\Tests\BaseTestCase;
use SplFileInfo;
#[RequiresPhpExtension('gd')]
#[CoversClass(\Intervention\Image\Drivers\Gd\Decoders\SplFileInfoImageDecoder::class)]
final class SplFileInfoImageDecoderTest extends BaseTestCase
{
public function testDecode(): void
{
$decoder = new SplFileInfoImageDecoder();
$decoder->setDriver(new Driver());
$result = $decoder->decode(
new SplFileInfo($this->getTestResourcePath('blue.gif'))
);
$this->assertInstanceOf(Image::class, $result);
}
}