diff --git a/tests/BaseTestCase.php b/tests/BaseTestCase.php index 392da50a..3950c337 100644 --- a/tests/BaseTestCase.php +++ b/tests/BaseTestCase.php @@ -13,7 +13,7 @@ abstract class BaseTestCase extends MockeryTestCase { public function getTestImagePath($filename = 'test.jpg'): string { - return sprintf('%s/images/%s', __DIR__, $filename); + return sprintf('%s/resources/%s', __DIR__, $filename); } public function getTestImageData($filename = 'test.jpg'): string diff --git a/tests/Traits/CanCreateGdTestImage.php b/tests/GdTestCase.php similarity index 94% rename from tests/Traits/CanCreateGdTestImage.php rename to tests/GdTestCase.php index 7e3425ca..08be306f 100644 --- a/tests/Traits/CanCreateGdTestImage.php +++ b/tests/GdTestCase.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Intervention\Image\Tests\Traits; +namespace Intervention\Image\Tests; use Intervention\Image\Drivers\Gd\Core; use Intervention\Image\Drivers\Gd\Decoders\FilePathImageDecoder; @@ -10,7 +10,7 @@ use Intervention\Image\Drivers\Gd\Driver; use Intervention\Image\Drivers\Gd\Frame; use Intervention\Image\Image; -trait CanCreateGdTestImage +abstract class GdTestCase extends BaseTestCase { public function readTestImage($filename = 'test.jpg'): Image { diff --git a/tests/Traits/CanCreateImagickTestImage.php b/tests/ImagickTestCase.php similarity index 87% rename from tests/Traits/CanCreateImagickTestImage.php rename to tests/ImagickTestCase.php index a94b7271..1b641c97 100644 --- a/tests/Traits/CanCreateImagickTestImage.php +++ b/tests/ImagickTestCase.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Intervention\Image\Tests\Traits; +namespace Intervention\Image\Tests; use Imagick; use ImagickPixel; @@ -11,12 +11,12 @@ use Intervention\Image\Drivers\Imagick\Decoders\FilePathImageDecoder; use Intervention\Image\Drivers\Imagick\Driver; use Intervention\Image\Image; -trait CanCreateImagickTestImage +abstract class ImagickTestCase extends BaseTestCase { public function readTestImage($filename = 'test.jpg'): Image { return (new FilePathImageDecoder())->handle( - sprintf('%s/../images/%s', __DIR__, $filename) + $this->getTestImagePath($filename) ); } diff --git a/tests/Unit/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php index aac7d3d6..1b345ddc 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\ColorspaceAnalyzer; use Intervention\Image\Interfaces\ColorspaceInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\ColorspaceAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\ColorspaceAnalyzer::class)] -final class ColorspaceAnalyzerTest extends BaseTestCase +final class ColorspaceAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Analyzers/HeightAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/HeightAnalyzerTest.php index 8601e45d..a13c674e 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/HeightAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/HeightAnalyzerTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Analyzers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\HeightAnalyzer; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\HeightAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\HeightAnalyzer::class)] -final class HeightAnalyzerTest extends BaseTestCase +final class HeightAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php index 79027a13..7257d02c 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\PixelColorAnalyzer; use Intervention\Image\Interfaces\ColorInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\PixelColorAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\PixelColorAnalyzer::class)] -final class PixelColorAnalyzerTest extends BaseTestCase +final class PixelColorAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Analyzers/PixelColorsAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/PixelColorsAnalyzerTest.php index fb8ca4bd..c895712e 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/PixelColorsAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/PixelColorsAnalyzerTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\PixelColorsAnalyzer; use Intervention\Image\Collection; use Intervention\Image\Interfaces\ColorInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\PixelColorsAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\PixelColorsAnalyzer::class)] -final class PixelColorsAnalyzerTest extends BaseTestCase +final class PixelColorsAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php index a7f41080..f6068457 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\ResolutionAnalyzer; use Intervention\Image\Resolution; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\ResolutionAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\ResolutionAnalyzer::class)] -final class ResolutionAnalyzerTest extends BaseTestCase +final class ResolutionAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Analyzers/WidthAnalyzerTest.php b/tests/Unit/Drivers/Gd/Analyzers/WidthAnalyzerTest.php index 01e72494..7caea47b 100644 --- a/tests/Unit/Drivers/Gd/Analyzers/WidthAnalyzerTest.php +++ b/tests/Unit/Drivers/Gd/Analyzers/WidthAnalyzerTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Analyzers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\WidthAnalyzer; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Analyzers\WidthAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\WidthAnalyzer::class)] -final class WidthAnalyzerTest extends BaseTestCase +final class WidthAnalyzerTest extends GdTestCase { - use CanCreateGdTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Decoders/FilePointerImageDecoderTest.php b/tests/Unit/Drivers/Gd/Decoders/FilePointerImageDecoderTest.php index 5969761e..c219cf86 100644 --- a/tests/Unit/Drivers/Gd/Decoders/FilePointerImageDecoderTest.php +++ b/tests/Unit/Drivers/Gd/Decoders/FilePointerImageDecoderTest.php @@ -8,15 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Drivers\Gd\Decoders\FilePointerImageDecoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Drivers\Gd\Decoders\FilePointerImageDecoder::class)] -final class FilePointerImageDecoderTest extends BaseTestCase +final class FilePointerImageDecoderTest extends GdTestCase { - use CanCreateGdTestImage; - public function testDecode(): void { $decoder = new FilePointerImageDecoder(); diff --git a/tests/Unit/Drivers/Gd/Decoders/ImageObjectDecoderTest.php b/tests/Unit/Drivers/Gd/Decoders/ImageObjectDecoderTest.php index 23d6e6c0..fb432118 100644 --- a/tests/Unit/Drivers/Gd/Decoders/ImageObjectDecoderTest.php +++ b/tests/Unit/Drivers/Gd/Decoders/ImageObjectDecoderTest.php @@ -8,15 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Drivers\Gd\Decoders\ImageObjectDecoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Drivers\Gd\Decoders\ImageObjectDecoder::class)] -final class ImageObjectDecoderTest extends BaseTestCase +final class ImageObjectDecoderTest extends GdTestCase { - use CanCreateGdTestImage; - public function testDecode(): void { $decoder = new ImageObjectDecoder(); diff --git a/tests/Unit/Drivers/Gd/Encoders/GifEncoderTest.php b/tests/Unit/Drivers/Gd/Encoders/GifEncoderTest.php index 4ccf758b..e0297a88 100644 --- a/tests/Unit/Drivers/Gd/Encoders/GifEncoderTest.php +++ b/tests/Unit/Drivers/Gd/Encoders/GifEncoderTest.php @@ -11,16 +11,13 @@ use Intervention\Image\Drivers\Gd\Driver; use Intervention\Image\Encoders\GifEncoder; use Intervention\Image\Drivers\Gd\Frame; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Encoders\GifEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Encoders\GifEncoder::class)] -final class GifEncoderTest extends BaseTestCase +final class GifEncoderTest extends GdTestCase { - use CanCreateGdTestImage; - protected function getTestImage(): Image { $gd1 = imagecreatetruecolor(30, 20); diff --git a/tests/Unit/Drivers/Gd/Encoders/PngEncoderTest.php b/tests/Unit/Drivers/Gd/Encoders/PngEncoderTest.php index 39759f6d..5fe61502 100644 --- a/tests/Unit/Drivers/Gd/Encoders/PngEncoderTest.php +++ b/tests/Unit/Drivers/Gd/Encoders/PngEncoderTest.php @@ -11,16 +11,13 @@ use Intervention\Image\Drivers\Gd\Driver; use Intervention\Image\Encoders\PngEncoder; use Intervention\Image\Drivers\Gd\Frame; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Encoders\PngEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Encoders\PngEncoder::class)] -final class PngEncoderTest extends BaseTestCase +final class PngEncoderTest extends GdTestCase { - use CanCreateGdTestImage; - protected function getTestImage(): Image { return new Image( diff --git a/tests/Unit/Drivers/Gd/ImageTest.php b/tests/Unit/Drivers/Gd/ImageTest.php index e49bea12..0dc8f2e5 100644 --- a/tests/Unit/Drivers/Gd/ImageTest.php +++ b/tests/Unit/Drivers/Gd/ImageTest.php @@ -22,14 +22,11 @@ use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Interfaces\ResolutionInterface; use Intervention\Image\Interfaces\SizeInterface; use Intervention\Image\Modifiers\GreyscaleModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; use Intervention\Image\Typography\Font; -final class ImageTest extends BaseTestCase +final class ImageTest extends GdTestCase { - use CanCreateGdTestImage; - protected Image $image; protected function setUp(): void diff --git a/tests/Unit/Drivers/Gd/Modifiers/BlurModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/BlurModifierTest.php index 37205ff6..2e5fcaa7 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/BlurModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/BlurModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\BlurModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\BlurModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\BlurModifier::class)] -final class BlurModifierTest extends BaseTestCase +final class BlurModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testColorChange(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/BrightnessModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/BrightnessModifierTest.php index 17bc84d9..73c34688 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/BrightnessModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/BrightnessModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\BrightnessModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\BrightnessModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\BrightnessModifier::class)] -final class BrightnessModifierTest extends BaseTestCase +final class BrightnessModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ColorizeModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ColorizeModifierTest.php index 26465647..0876ccc6 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ColorizeModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ColorizeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ColorizeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ColorizeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ColorizeModifier::class)] -final class ColorizeModifierTest extends BaseTestCase +final class ColorizeModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ContainModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ContainModifierTest.php index 48574d4b..35138fe7 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ContainModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ContainModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ContainModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ContainModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ContainModifier::class)] -final class ContainModifierTest extends BaseTestCase +final class ContainModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ContrastModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ContrastModifierTest.php index a7e5a314..f1c1cbae 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ContrastModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ContrastModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ContrastModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ContrastModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ContrastModifier::class)] -final class ContrastModifierTest extends BaseTestCase +final class ContrastModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/CoverModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/CoverModifierTest.php index 8b887bdf..20ccd37d 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/CoverModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/CoverModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\CoverModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\CoverModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\CoverModifier::class)] -final class CoverModifierTest extends BaseTestCase +final class CoverModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/CropModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/CropModifierTest.php index c6273818..4a5e268d 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/CropModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/CropModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\CropModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\CropModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\CropModifier::class)] -final class CropModifierTest extends BaseTestCase +final class CropModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/DrawEllipseModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/DrawEllipseModifierTest.php index 5e5d79a0..da79e1e7 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/DrawEllipseModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/DrawEllipseModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawEllipseModifier; use Intervention\Image\Geometry\Ellipse; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\DrawEllipseModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\DrawEllipseModifier::class)] -final class DrawEllipseModifierTest extends BaseTestCase +final class DrawEllipseModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/DrawLineModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/DrawLineModifierTest.php index 369442e2..67e19f11 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/DrawLineModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/DrawLineModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawLineModifier; use Intervention\Image\Geometry\Line; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\DrawLineModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\DrawLineModifier::class)] -final class DrawLineModifierTest extends BaseTestCase +final class DrawLineModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/DrawPixelModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/DrawPixelModifierTest.php index 6b9aebed..c72f22f4 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/DrawPixelModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/DrawPixelModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawPixelModifier; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\DrawPixelModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\DrawPixelModifier::class)] -final class DrawPixelModifierTest extends BaseTestCase +final class DrawPixelModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php index c41cbbf8..e966b060 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawPolygonModifier; use Intervention\Image\Geometry\Point; use Intervention\Image\Geometry\Polygon; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\DrawPixelModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\DrawPixelModifier::class)] -final class DrawPolygonModifierTest extends BaseTestCase +final class DrawPolygonModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php index 291643c3..c7ef3411 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawRectangleModifier; use Intervention\Image\Geometry\Point; use Intervention\Image\Geometry\Rectangle; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\DrawRectangleModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\DrawRectangleModifier::class)] -final class DrawRectangleModifierTest extends BaseTestCase +final class DrawRectangleModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/FillModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/FillModifierTest.php index 63f8aec2..d0ef84e0 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/FillModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/FillModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Colors\Rgb\Color; use Intervention\Image\Modifiers\FillModifier; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\FillModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\FillModifier::class)] -final class FillModifierTest extends BaseTestCase +final class FillModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testFloodFillColor(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/FlipFlopModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/FlipFlopModifierTest.php index 69a56f23..a5fd7bef 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/FlipFlopModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/FlipFlopModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\FlipModifier; use Intervention\Image\Modifiers\FlopModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\FlipModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\FlipModifier::class)] -final class FlipFlopModifierTest extends BaseTestCase +final class FlipFlopModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testFlipImage(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/GammaModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/GammaModifierTest.php index 1a18069a..b193d829 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/GammaModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/GammaModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\GammaModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\GammaModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\GammaModifier::class)] -final class GammaModifierTest extends BaseTestCase +final class GammaModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModifier(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/GreyscaleModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/GreyscaleModifierTest.php index a31de139..7dad56ee 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/GreyscaleModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/GreyscaleModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\GreyscaleModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\GreyscaleModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\GreyscaleModifier::class)] -final class GreyscaleModifierTest extends BaseTestCase +final class GreyscaleModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testColorChange(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/InvertModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/InvertModifierTest.php index 882d1a1f..99c8087a 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/InvertModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/InvertModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\InvertModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\InvertModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\InvertModifier::class)] -final class InvertModifierTest extends BaseTestCase +final class InvertModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/PixelateModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/PixelateModifierTest.php index af89472c..444b95fc 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/PixelateModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/PixelateModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\PixelateModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\PixelateModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\PixelateModifier::class)] -final class PixelateModifierTest extends BaseTestCase +final class PixelateModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php index dc53fd01..00ff0064 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\PlaceModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\PlaceModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\PlaceModifier::class)] -final class PlaceModifierTest extends BaseTestCase +final class PlaceModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testColorChange(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/QuantizeColorsModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/QuantizeColorsModifierTest.php index 8d40421f..73d253fc 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/QuantizeColorsModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/QuantizeColorsModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Exceptions\InputException; use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Modifiers\QuantizeColorsModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\QuantizeColorsModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\QuantizeColorsModifier::class)] -final class QuantizeColorsModifierTest extends BaseTestCase +final class QuantizeColorsModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testColorChange(): void { $image = $this->readTestImage('gradient.bmp'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php index 495be08c..43cdce8d 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Exceptions\InputException; use Intervention\Image\Modifiers\RemoveAnimationModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\RemoveAnimationModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\RemoveAnimationModifier::class)] -final class RemoveAnimationModifierTest extends BaseTestCase +final class RemoveAnimationModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testApply(): void { $image = $this->readTestImage('animation.gif'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php index 9d573d80..04a2d886 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeCanvasModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ResizeCanvasModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ResizeCanvasModifier::class)] -final class ResizeCanvasModifierTest extends BaseTestCase +final class ResizeCanvasModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->createTestImage(1, 1); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php index d415d6d1..2752bbf6 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeCanvasRelativeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ResizeCanvasRelativeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ResizeCanvasRelativeModifier::class)] -final class ResizeCanvasRelativeModifierTest extends BaseTestCase +final class ResizeCanvasRelativeModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->createTestImage(1, 1); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ResizeModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ResizeModifierTest.php index a5f86d69..dde9c0d2 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ResizeModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ResizeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ResizeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ResizeModifier::class)] -final class ResizeModifierTest extends BaseTestCase +final class ResizeModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/ResolutionModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/ResolutionModifierTest.php index 1813ca8a..df237fd4 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/ResolutionModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/ResolutionModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResolutionModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\ResolutionModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\ResolutionModifier::class)] -final class ResolutionModifierTest extends BaseTestCase +final class ResolutionModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testResolutionChange(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/RotateModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/RotateModifierTest.php index d66d551f..f7214a7e 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/RotateModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/RotateModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\RotateModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\RotateModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\RotateModifier::class)] -final class RotateModifierTest extends BaseTestCase +final class RotateModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testRotate(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Gd/Modifiers/SharpenModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/SharpenModifierTest.php index 61a4e456..7b309fa5 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/SharpenModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/SharpenModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\SharpenModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateGdTestImage; +use Intervention\Image\Tests\GdTestCase; #[RequiresPhpExtension('gd')] #[CoversClass(\Intervention\Image\Modifiers\SharpenModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\SharpenModifier::class)] -final class SharpenModifierTest extends BaseTestCase +final class SharpenModifierTest extends GdTestCase { - use CanCreateGdTestImage; - public function testModify(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php index 975aa47a..ba90b8b4 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\ColorspaceAnalyzer; use Intervention\Image\Interfaces\ColorspaceInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\ColorspaceAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\ColorspaceAnalyzer::class)] -final class ColorspaceAnalyzerTest extends BaseTestCase +final class ColorspaceAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php index b4f46fe1..ab1e3125 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Analyzers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\HeightAnalyzer; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\HeightAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\HeightAnalyzer::class)] -final class HeightAnalyzerTest extends BaseTestCase +final class HeightAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php index c4dbee2d..0a577629 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\PixelColorAnalyzer; use Intervention\Image\Interfaces\ColorInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\PixelColorAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\PixelColorAnalyzer::class)] -final class PixelColorAnalyzerTest extends BaseTestCase +final class PixelColorAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/PixelColorsAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/PixelColorsAnalyzerTest.php index 5f8e4ce3..c1651bef 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/PixelColorsAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/PixelColorsAnalyzerTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\PixelColorsAnalyzer; use Intervention\Image\Collection; use Intervention\Image\Interfaces\ColorInterface; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\PixelColorsAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\PixelColorsAnalyzer::class)] -final class PixelColorsAnalyzerTest extends BaseTestCase +final class PixelColorsAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php index 64bace9f..f68e87a8 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\ProfileAnalyzer; use Intervention\Image\Exceptions\ColorException; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\ProfileAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\ProfileAnalyzer::class)] -final class ProfileAnalyzerTest extends BaseTestCase +final class ProfileAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php index 4b5c0189..363fbbdb 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\ResolutionAnalyzer; use Intervention\Image\Resolution; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\ResolutionAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\ResolutionAnalyzer::class)] -final class ResolutionAnalyzerTest extends BaseTestCase +final class ResolutionAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php b/tests/Unit/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php index 8e3e3ea9..acfecf53 100644 --- a/tests/Unit/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php +++ b/tests/Unit/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Analyzers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Analyzers\WidthAnalyzer; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Analyzers\WidthAnalyzer::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\WidthAnalyzer::class)] -final class WidthAnalyzerTest extends BaseTestCase +final class WidthAnalyzerTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testAnalyze(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Decoders/FilePointerImageDecoderTest.php b/tests/Unit/Drivers/Imagick/Decoders/FilePointerImageDecoderTest.php index b0cd97a9..13715584 100644 --- a/tests/Unit/Drivers/Imagick/Decoders/FilePointerImageDecoderTest.php +++ b/tests/Unit/Drivers/Imagick/Decoders/FilePointerImageDecoderTest.php @@ -8,15 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Drivers\Imagick\Decoders\FilePointerImageDecoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Drivers\Imagick\Decoders\FilePointerImageDecoder::class)] -final class FilePointerImageDecoderTest extends BaseTestCase +final class FilePointerImageDecoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testDecode(): void { $decoder = new FilePointerImageDecoder(); diff --git a/tests/Unit/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php b/tests/Unit/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php index 1e4b6257..7adf976b 100644 --- a/tests/Unit/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php +++ b/tests/Unit/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php @@ -8,15 +8,12 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Drivers\Imagick\Decoders\ImageObjectDecoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Drivers\Imagick\Decoders\ImageObjectDecoder::class)] -final class ImageObjectDecoderTest extends BaseTestCase +final class ImageObjectDecoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testDecode(): void { $decoder = new ImageObjectDecoder(); diff --git a/tests/Unit/Drivers/Imagick/Encoders/BmpEncoderTest.php b/tests/Unit/Drivers/Imagick/Encoders/BmpEncoderTest.php index fead4565..fd09e713 100644 --- a/tests/Unit/Drivers/Imagick/Encoders/BmpEncoderTest.php +++ b/tests/Unit/Drivers/Imagick/Encoders/BmpEncoderTest.php @@ -12,16 +12,13 @@ use Intervention\Image\Drivers\Imagick\Core; use Intervention\Image\Drivers\Imagick\Driver; use Intervention\Image\Encoders\BmpEncoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Encoders\BmpEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Encoders\BmpEncoder::class)] -final class BmpEncoderTest extends BaseTestCase +final class BmpEncoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - protected function getTestImage(): Image { $imagick = new Imagick(); diff --git a/tests/Unit/Drivers/Imagick/Encoders/GifEncoderTest.php b/tests/Unit/Drivers/Imagick/Encoders/GifEncoderTest.php index 79745c53..4492f502 100644 --- a/tests/Unit/Drivers/Imagick/Encoders/GifEncoderTest.php +++ b/tests/Unit/Drivers/Imagick/Encoders/GifEncoderTest.php @@ -12,16 +12,13 @@ use Intervention\Image\Drivers\Imagick\Core; use Intervention\Image\Drivers\Imagick\Driver; use Intervention\Image\Encoders\GifEncoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Encoders\GifEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Encoders\GifEncoder::class)] -final class GifEncoderTest extends BaseTestCase +final class GifEncoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - protected function getTestImage(): Image { $imagick = new Imagick(); diff --git a/tests/Unit/Drivers/Imagick/Encoders/HeicEncoderTest.php b/tests/Unit/Drivers/Imagick/Encoders/HeicEncoderTest.php index c7ffd386..a8d9aac2 100644 --- a/tests/Unit/Drivers/Imagick/Encoders/HeicEncoderTest.php +++ b/tests/Unit/Drivers/Imagick/Encoders/HeicEncoderTest.php @@ -12,16 +12,13 @@ use Intervention\Image\Drivers\Imagick\Core; use Intervention\Image\Drivers\Imagick\Driver; use Intervention\Image\Encoders\HeicEncoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Encoders\HeicEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Encoders\HeicEncoder::class)] -final class HeicEncoderTest extends BaseTestCase +final class HeicEncoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - protected function getTestImage(): Image { $imagick = new Imagick(); diff --git a/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php b/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php index c8c5a64e..b25a37cb 100644 --- a/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php +++ b/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php @@ -12,16 +12,13 @@ use Intervention\Image\Drivers\Imagick\Core; use Intervention\Image\Drivers\Imagick\Driver; use Intervention\Image\Encoders\PngEncoder; use Intervention\Image\Image; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Encoders\PngEncoder::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Encoders\PngEncoder::class)] -final class PngEncoderTest extends BaseTestCase +final class PngEncoderTest extends ImagickTestCase { - use CanCreateImagickTestImage; - protected function getTestImage(): Image { $imagick = new Imagick(); diff --git a/tests/Unit/Drivers/Imagick/ImageTest.php b/tests/Unit/Drivers/Imagick/ImageTest.php index 927f195f..86edde94 100644 --- a/tests/Unit/Drivers/Imagick/ImageTest.php +++ b/tests/Unit/Drivers/Imagick/ImageTest.php @@ -24,13 +24,10 @@ use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Interfaces\ResolutionInterface; use Intervention\Image\Interfaces\SizeInterface; use Intervention\Image\Modifiers\GreyscaleModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; -final class ImageTest extends BaseTestCase +final class ImageTest extends ImagickTestCase { - use CanCreateImagickTestImage; - protected Image $image; protected function setUp(): void diff --git a/tests/Unit/Drivers/Imagick/Modifiers/BlurModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/BlurModifierTest.php index 99ff1213..b0929cdb 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/BlurModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/BlurModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\BlurModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\BlurModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\BlurModifier::class)] -final class BlurModifierTest extends BaseTestCase +final class BlurModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testColorChange(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/BrightnessModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/BrightnessModifierTest.php index b09afc8f..461e5d7e 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/BrightnessModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/BrightnessModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\BrightnessModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\BrightnessModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\BrightnessModifier::class)] -final class BrightnessModifierTest extends BaseTestCase +final class BrightnessModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ColorizeModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ColorizeModifierTest.php index 27edba59..2b971cdf 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ColorizeModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ColorizeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ColorizeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ColorizeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ColorizeModifier::class)] -final class ColorizeModifierTest extends BaseTestCase +final class ColorizeModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ContainModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ContainModifierTest.php index 164d80f9..215487a3 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ContainModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ContainModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ContainModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ContainModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ContainModifier::class)] -final class ContainModifierTest extends BaseTestCase +final class ContainModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ContrastModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ContrastModifierTest.php index fb14365a..3c5519a1 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ContrastModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ContrastModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ContrastModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ContrastModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ContrastModifier::class)] -final class ContrastModifierTest extends BaseTestCase +final class ContrastModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/CoverModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/CoverModifierTest.php index 15c70d6e..07c607a1 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/CoverModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/CoverModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\CoverModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\CoverModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\CoverModifier::class)] -final class CoverModifierTest extends BaseTestCase +final class CoverModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/CropModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/CropModifierTest.php index b6b89a5e..2b3691f7 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/CropModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/CropModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\CropModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\CropModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\CropModifier::class)] -final class CropModifierTest extends BaseTestCase +final class CropModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php index bbe72ea5..71da4e74 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawEllipseModifier; use Intervention\Image\Geometry\Ellipse; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\DrawEllipseModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\DrawEllipseModifier::class)] -final class DrawEllipseModifierTest extends BaseTestCase +final class DrawEllipseModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/DrawLineModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/DrawLineModifierTest.php index 7f52e945..01762cb9 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/DrawLineModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/DrawLineModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawLineModifier; use Intervention\Image\Geometry\Line; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\DrawLineModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\DrawLineModifier::class)] -final class DrawLineModifierTest extends BaseTestCase +final class DrawLineModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php index a4a906eb..d68d905f 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawPixelModifier; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\DrawPixelModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\DrawPixelModifier::class)] -final class DrawPixelModifierTest extends BaseTestCase +final class DrawPixelModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php index 19da9a31..36305db7 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawPolygonModifier; use Intervention\Image\Geometry\Point; use Intervention\Image\Geometry\Polygon; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\DrawPolygonModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\DrawPolygonModifier::class)] -final class DrawPolygonModifierTest extends BaseTestCase +final class DrawPolygonModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php index 7a7627f4..158a3643 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\DrawRectangleModifier; use Intervention\Image\Geometry\Point; use Intervention\Image\Geometry\Rectangle; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\DrawRectangleModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\DrawRectangleModifier::class)] -final class DrawRectangleModifierTest extends BaseTestCase +final class DrawRectangleModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/FillModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/FillModifierTest.php index 3d33cb2f..6157b2ab 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/FillModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/FillModifierTest.php @@ -9,16 +9,13 @@ use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Colors\Rgb\Color; use Intervention\Image\Modifiers\FillModifier; use Intervention\Image\Geometry\Point; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\FillModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\FillModifier::class)] -final class FillModifierTest extends BaseTestCase +final class FillModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testFloodFillColor(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php index 32c72f79..0663aacb 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php @@ -8,18 +8,15 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\FlipModifier; use Intervention\Image\Modifiers\FlopModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\FlipModifier::class)] #[CoversClass(\Intervention\Image\Modifiers\FlopModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\FlipModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\FlopModifier::class)] -final class FlipFlopModifierTest extends BaseTestCase +final class FlipFlopModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testFlipImage(): void { $image = $this->readTestImage('tile.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/GammaModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/GammaModifierTest.php index 675b7e9f..2bf6377a 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/GammaModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/GammaModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\GammaModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\GammaModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\GammaModifier::class)] -final class GammaModifierTest extends BaseTestCase +final class GammaModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModifier(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php index dca2a06e..52d7d8bc 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\GreyscaleModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\GreyscaleModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\GreyscaleModifier::class)] -final class GreyscaleModifierTest extends BaseTestCase +final class GreyscaleModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testColorChange(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/InvertModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/InvertModifierTest.php index 8b77ff4a..10697986 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/InvertModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/InvertModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\InvertModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\InvertModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\InvertModifier::class)] -final class InvertModifierTest extends BaseTestCase +final class InvertModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/PixelateModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/PixelateModifierTest.php index 49f0ade8..ce897587 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/PixelateModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/PixelateModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\PixelateModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\PixelateModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\PixelateModifier::class)] -final class PixelateModifierTest extends BaseTestCase +final class PixelateModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php index 42668aa5..60fc84af 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\PlaceModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\BlurModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\PlaceModifier::class)] -final class PlaceModifierTest extends BaseTestCase +final class PlaceModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testColorChange(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/QuantizeColorsModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/QuantizeColorsModifierTest.php index fe7d9792..e6c9d5ef 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/QuantizeColorsModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/QuantizeColorsModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Exceptions\InputException; use Intervention\Image\Modifiers\QuantizeColorsModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\QuantizeColorsModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\QuantizeColorsModifier::class)] -final class QuantizeColorsModifierTest extends BaseTestCase +final class QuantizeColorsModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testColorChange(): void { $image = $this->readTestImage('gradient.bmp'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php index 4f73dd0f..48bc3794 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php @@ -8,16 +8,13 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Exceptions\InputException; use Intervention\Image\Modifiers\RemoveAnimationModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\RemoveAnimationModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\RemoveAnimationModifier::class)] -final class RemoveAnimationModifierTest extends BaseTestCase +final class RemoveAnimationModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testApply(): void { $image = $this->readTestImage('animation.gif'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php index 17d27df6..3f57b0b6 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeCanvasModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ResizeCanvasModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ResizeCanvasModifier::class)] -final class ResizeCanvasModifierTest extends BaseTestCase +final class ResizeCanvasModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->createTestImage(1, 1); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php index a68fb8d2..466cb348 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeCanvasRelativeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ResizeCanvasRelativeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ResizeCanvasRelativeModifier::class)] -final class ResizeCanvasRelativeModifierTest extends BaseTestCase +final class ResizeCanvasRelativeModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->createTestImage(1, 1); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ResizeModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ResizeModifierTest.php index a38f4cd7..5441116d 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ResizeModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ResizeModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResizeModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ResizeModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ResizeModifier::class)] -final class ResizeModifierTest extends BaseTestCase +final class ResizeModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('blocks.png'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/ResolutionModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/ResolutionModifierTest.php index 769d90b6..1ced8dea 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/ResolutionModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/ResolutionModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\ResolutionModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\ResolutionModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\ResolutionModifier::class)] -final class ResolutionModifierTest extends BaseTestCase +final class ResolutionModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testResolutionChange(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/RotateModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/RotateModifierTest.php index 7e410ad7..a280009c 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/RotateModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/RotateModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\RotateModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\RotateModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\RotateModifier::class)] -final class RotateModifierTest extends BaseTestCase +final class RotateModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testRotate(): void { $image = $this->readTestImage('test.jpg'); diff --git a/tests/Unit/Drivers/Imagick/Modifiers/SharpenModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/SharpenModifierTest.php index 964c1467..4e0f35d3 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/SharpenModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/SharpenModifierTest.php @@ -7,16 +7,13 @@ namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Modifiers; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use Intervention\Image\Modifiers\SharpenModifier; -use Intervention\Image\Tests\BaseTestCase; -use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; +use Intervention\Image\Tests\ImagickTestCase; #[RequiresPhpExtension('imagick')] #[CoversClass(\Intervention\Image\Modifiers\SharpenModifier::class)] #[CoversClass(\Intervention\Image\Drivers\Imagick\Modifiers\SharpenModifier::class)] -final class SharpenModifierTest extends BaseTestCase +final class SharpenModifierTest extends ImagickTestCase { - use CanCreateImagickTestImage; - public function testModify(): void { $image = $this->readTestImage('trim.png'); diff --git a/tests/images/animation.gif b/tests/resources/animation.gif similarity index 100% rename from tests/images/animation.gif rename to tests/resources/animation.gif diff --git a/tests/images/blocks.png b/tests/resources/blocks.png similarity index 100% rename from tests/images/blocks.png rename to tests/resources/blocks.png diff --git a/tests/images/blue.gif b/tests/resources/blue.gif similarity index 100% rename from tests/images/blue.gif rename to tests/resources/blue.gif diff --git a/tests/images/cats.gif b/tests/resources/cats.gif similarity index 100% rename from tests/images/cats.gif rename to tests/resources/cats.gif diff --git a/tests/images/circle.png b/tests/resources/circle.png similarity index 100% rename from tests/images/circle.png rename to tests/resources/circle.png diff --git a/tests/images/cmyk.jpg b/tests/resources/cmyk.jpg similarity index 100% rename from tests/images/cmyk.jpg rename to tests/resources/cmyk.jpg diff --git a/tests/images/exif.jpg b/tests/resources/exif.jpg similarity index 100% rename from tests/images/exif.jpg rename to tests/resources/exif.jpg diff --git a/tests/images/gradient.bmp b/tests/resources/gradient.bmp similarity index 100% rename from tests/images/gradient.bmp rename to tests/resources/gradient.bmp diff --git a/tests/images/gradient.gif b/tests/resources/gradient.gif similarity index 100% rename from tests/images/gradient.gif rename to tests/resources/gradient.gif diff --git a/tests/images/green.gif b/tests/resources/green.gif similarity index 100% rename from tests/images/green.gif rename to tests/resources/green.gif diff --git a/tests/images/orientation.jpg b/tests/resources/orientation.jpg similarity index 100% rename from tests/images/orientation.jpg rename to tests/resources/orientation.jpg diff --git a/tests/images/red.gif b/tests/resources/red.gif similarity index 100% rename from tests/images/red.gif rename to tests/resources/red.gif diff --git a/tests/images/test.jpg b/tests/resources/test.jpg similarity index 100% rename from tests/images/test.jpg rename to tests/resources/test.jpg diff --git a/tests/images/tile.png b/tests/resources/tile.png similarity index 100% rename from tests/images/tile.png rename to tests/resources/tile.png diff --git a/tests/images/trim.png b/tests/resources/trim.png similarity index 100% rename from tests/images/trim.png rename to tests/resources/trim.png