1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 17:19:50 +02:00

Add tests for PNG indexed options

This commit is contained in:
Oliver Vogel
2024-08-03 11:15:29 +02:00
parent 2ee997d98f
commit 63990a8fb3
7 changed files with 125 additions and 12 deletions

View File

@@ -12,14 +12,14 @@ use Intervention\Image\Image;
abstract class GdTestCase extends BaseTestCase
{
public function readTestImage($filename = 'test.jpg'): Image
public static function readTestImage($filename = 'test.jpg'): Image
{
return (new Driver())->specialize(new FilePathImageDecoder())->decode(
$this->getTestResourcePath($filename)
static::getTestResourcePath($filename)
);
}
public function createTestImage(int $width, int $height): Image
public static function createTestImage(int $width, int $height): Image
{
$gd = imagecreatetruecolor($width, $height);
imagefill($gd, 0, 0, imagecolorallocate($gd, 255, 0, 0));
@@ -32,7 +32,7 @@ abstract class GdTestCase extends BaseTestCase
);
}
public function createTestAnimation(): Image
public static function createTestAnimation(): Image
{
$gd1 = imagecreatetruecolor(3, 2);
imagefill($gd1, 0, 0, imagecolorallocate($gd1, 255, 0, 0));