1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-22 21:42:53 +02:00

Add tests

This commit is contained in:
Oliver Vogel
2024-05-20 10:30:14 +02:00
parent 25058825c2
commit 7b8b9e1e93
2 changed files with 23 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Intervention\Image\Tests\Unit;
use Intervention\Image\Colors\Rgb\Decoders\HexColorDecoder;
use Intervention\Image\Drivers\Gd\Driver as GdDriver;
use Intervention\Image\Drivers\Imagick\Driver as ImagickDriver;
use Intervention\Image\Exceptions\DecoderException;
@@ -59,4 +60,15 @@ class InputHandlerTest extends BaseTestCase
return $data;
}
public function testResolveWithoutDriver(): void
{
$handler = new InputHandler([new HexColorDecoder()]);
$result = $handler->handle('fff');
$this->assertInstanceOf(ColorInterface::class, $result);
$handler = new InputHandler([HexColorDecoder::class]);
$result = $handler->handle('fff');
$this->assertInstanceOf(ColorInterface::class, $result);
}
}