1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 12:18:14 +01:00

Restructure test folders & refactor test traits

This commit is contained in:
Oliver Vogel 2024-03-10 10:00:06 +01:00
parent 2e9f91c311
commit 67fde5f87e
No known key found for this signature in database
GPG Key ID: 1B19D214C02D69BB
97 changed files with 164 additions and 401 deletions

View File

@ -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

View File

@ -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
{

View File

@ -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)
);
}

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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(

View File

@ -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

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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);

View File

@ -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);

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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);

View File

@ -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);

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

View File

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

View File

Before

Width:  |  Height:  |  Size: 47 B

After

Width:  |  Height:  |  Size: 47 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

View File

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 948 B

View File

Before

Width:  |  Height:  |  Size: 47 B

After

Width:  |  Height:  |  Size: 47 B

View File

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 571 B

View File

Before

Width:  |  Height:  |  Size: 47 B

After

Width:  |  Height:  |  Size: 47 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 156 B

View File

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 258 B