diff --git a/tests/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php b/tests/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php index c9303f51..2dd2cb92 100644 --- a/tests/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php +++ b/tests/Drivers/Gd/Analyzers/ColorspaceAnalyzerTest.php @@ -13,7 +13,7 @@ class ColorspaceAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new ColorspaceAnalyzer(); $result = $analyzer->analyze($image); $this->assertInstanceOf(ColorspaceInterface::class, $result); diff --git a/tests/Drivers/Gd/Analyzers/HeightAnalyzerTest.php b/tests/Drivers/Gd/Analyzers/HeightAnalyzerTest.php index 0a189508..eb7873b0 100644 --- a/tests/Drivers/Gd/Analyzers/HeightAnalyzerTest.php +++ b/tests/Drivers/Gd/Analyzers/HeightAnalyzerTest.php @@ -12,7 +12,7 @@ class HeightAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new HeightAnalyzer(); $result = $analyzer->analyze($image); $this->assertEquals(16, $result); diff --git a/tests/Drivers/Gd/Analyzers/PixelColorAnalyzer.php b/tests/Drivers/Gd/Analyzers/PixelColorAnalyzer.php index 782c4db8..12a31530 100644 --- a/tests/Drivers/Gd/Analyzers/PixelColorAnalyzer.php +++ b/tests/Drivers/Gd/Analyzers/PixelColorAnalyzer.php @@ -13,7 +13,7 @@ class PixelColorAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new PixelColorAnalyzer(0, 0); $result = $analyzer->analyze($image); $this->assertInstanceOf(ColorInterface::class, $result); diff --git a/tests/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php b/tests/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php index f2e0c2ef..497756d1 100644 --- a/tests/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php +++ b/tests/Drivers/Gd/Analyzers/PixelColorAnalyzerTest.php @@ -14,7 +14,7 @@ class PixelColorsAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new PixelColorsAnalyzer(0, 0); $result = $analyzer->analyze($image); $this->assertInstanceOf(Collection::class, $result); diff --git a/tests/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php b/tests/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php index 630467b9..21263f16 100644 --- a/tests/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php +++ b/tests/Drivers/Gd/Analyzers/ResolutionAnalyzerTest.php @@ -13,7 +13,7 @@ class ResolutionAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new ResolutionAnalyzer(); $result = $analyzer->analyze($image); $this->assertInstanceOf(Resolution::class, $result); diff --git a/tests/Drivers/Gd/Analyzers/WidthAnalyzerTest.php b/tests/Drivers/Gd/Analyzers/WidthAnalyzerTest.php index 50e416f6..1123a139 100644 --- a/tests/Drivers/Gd/Analyzers/WidthAnalyzerTest.php +++ b/tests/Drivers/Gd/Analyzers/WidthAnalyzerTest.php @@ -12,7 +12,7 @@ class WidthAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new WidthAnalyzer(); $result = $analyzer->analyze($image); $this->assertEquals(16, $result); diff --git a/tests/Drivers/Gd/Decoders/ImageObjectDecoderTest.php b/tests/Drivers/Gd/Decoders/ImageObjectDecoderTest.php index f90a7a9c..5cd03ff2 100644 --- a/tests/Drivers/Gd/Decoders/ImageObjectDecoderTest.php +++ b/tests/Drivers/Gd/Decoders/ImageObjectDecoderTest.php @@ -18,7 +18,7 @@ class ImageObjectDecoderTest extends TestCase public function testDecode(): void { $decoder = new ImageObjectDecoder(); - $result = $decoder->decode($this->createTestImage('blue.gif')); + $result = $decoder->decode($this->readTestImage('blue.gif')); $this->assertInstanceOf(Image::class, $result); } } diff --git a/tests/Drivers/Gd/Encoders/GifEncoderTest.php b/tests/Drivers/Gd/Encoders/GifEncoderTest.php index 372a1bab..bc33ec7c 100644 --- a/tests/Drivers/Gd/Encoders/GifEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/GifEncoderTest.php @@ -49,7 +49,7 @@ class GifEncoderTest extends TestCase public function testEncodeReduced(): void { - $image = $this->createTestImage('gradient.gif'); + $image = $this->readTestImage('gradient.gif'); $gd = $image->core()->native(); $this->assertEquals(15, imagecolorstotal($gd)); $encoder = new GifEncoder(2); diff --git a/tests/Drivers/Gd/Encoders/PngEncoderTest.php b/tests/Drivers/Gd/Encoders/PngEncoderTest.php index fa061b62..738f0da8 100644 --- a/tests/Drivers/Gd/Encoders/PngEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/PngEncoderTest.php @@ -38,7 +38,7 @@ class PngEncoderTest extends TestCase public function testEncodeReduced(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $gd = $image->core()->native(); $this->assertEquals(3, imagecolorstotal($gd)); $encoder = new PngEncoder(2); diff --git a/tests/Drivers/Gd/Modifiers/BlurModifierTest.php b/tests/Drivers/Gd/Modifiers/BlurModifierTest.php index 675a2003..c507fae2 100644 --- a/tests/Drivers/Gd/Modifiers/BlurModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/BlurModifierTest.php @@ -16,7 +16,7 @@ class BlurModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new BlurModifier(30)); $this->assertEquals('4fa68d', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/BrightnessModifierTest.php b/tests/Drivers/Gd/Modifiers/BrightnessModifierTest.php index 4e26b697..6133a9ae 100644 --- a/tests/Drivers/Gd/Modifiers/BrightnessModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/BrightnessModifierTest.php @@ -16,7 +16,7 @@ class BrightnessModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new BrightnessModifier(30)); $this->assertEquals('4cfaff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/ColorizeModifierTest.php b/tests/Drivers/Gd/Modifiers/ColorizeModifierTest.php index 6430609b..a4c0a019 100644 --- a/tests/Drivers/Gd/Modifiers/ColorizeModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ColorizeModifierTest.php @@ -16,7 +16,7 @@ class ColorizeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $image = $image->modify(new ColorizeModifier(100, -100, -100)); $this->assertColor(255, 0, 0, 255, $image->pickColor(5, 5)); $this->assertColor(255, 0, 0, 255, $image->pickColor(15, 15)); diff --git a/tests/Drivers/Gd/Modifiers/ContainModifierTest.php b/tests/Drivers/Gd/Modifiers/ContainModifierTest.php index ebcb1d64..e648b5ed 100644 --- a/tests/Drivers/Gd/Modifiers/ContainModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ContainModifierTest.php @@ -16,7 +16,7 @@ class ContainModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $image->modify(new ContainModifier(200, 100, 'ff0')); diff --git a/tests/Drivers/Gd/Modifiers/ContrastModifierTest.php b/tests/Drivers/Gd/Modifiers/ContrastModifierTest.php index 535816db..5a2e5a0c 100644 --- a/tests/Drivers/Gd/Modifiers/ContrastModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ContrastModifierTest.php @@ -16,7 +16,7 @@ class ContrastModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new ContrastModifier(30)); $this->assertEquals('00ceff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/CoverModifierTest.php b/tests/Drivers/Gd/Modifiers/CoverModifierTest.php index 9d52dd43..0f88a9b9 100644 --- a/tests/Drivers/Gd/Modifiers/CoverModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/CoverModifierTest.php @@ -16,7 +16,7 @@ class CoverModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $image->modify(new CoverModifier(100, 100, 'center')); diff --git a/tests/Drivers/Gd/Modifiers/CropModifierTest.php b/tests/Drivers/Gd/Modifiers/CropModifierTest.php index 177897e3..a51e7d6f 100644 --- a/tests/Drivers/Gd/Modifiers/CropModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/CropModifierTest.php @@ -16,7 +16,7 @@ class CropModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $image = $image->modify(new CropModifier(200, 200, 0, 0, 'bottom-right')); $this->assertEquals(200, $image->width()); $this->assertEquals(200, $image->height()); diff --git a/tests/Drivers/Gd/Modifiers/DrawEllipseModiferTest.php b/tests/Drivers/Gd/Modifiers/DrawEllipseModiferTest.php index af8911ce..78fc3c03 100644 --- a/tests/Drivers/Gd/Modifiers/DrawEllipseModiferTest.php +++ b/tests/Drivers/Gd/Modifiers/DrawEllipseModiferTest.php @@ -18,7 +18,7 @@ class DrawEllipseModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $drawable = new Ellipse(10, 10, new Point(14, 14)); $drawable->setBackgroundColor('b53717'); diff --git a/tests/Drivers/Gd/Modifiers/DrawLineModiferTest.php b/tests/Drivers/Gd/Modifiers/DrawLineModiferTest.php index 97ace2a2..8a4df673 100644 --- a/tests/Drivers/Gd/Modifiers/DrawLineModiferTest.php +++ b/tests/Drivers/Gd/Modifiers/DrawLineModiferTest.php @@ -18,7 +18,7 @@ class DrawLineModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $line = new Line(new Point(0, 0), new Point(10, 0), 4); $line->setBackgroundColor('b53517'); diff --git a/tests/Drivers/Gd/Modifiers/DrawPixelModifierTest.php b/tests/Drivers/Gd/Modifiers/DrawPixelModifierTest.php index b3609bce..c1c7bcfd 100644 --- a/tests/Drivers/Gd/Modifiers/DrawPixelModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/DrawPixelModifierTest.php @@ -17,7 +17,7 @@ class DrawPixelModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new DrawPixelModifier(new Point(14, 14), 'ffffff')); $this->assertEquals('ffffff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php b/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php index 5556d1c3..dc04a92e 100644 --- a/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php @@ -18,7 +18,7 @@ class DrawPolygonModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $drawable = new Polygon([new Point(0, 0), new Point(15, 15), new Point(20, 20)]); $drawable->setBackgroundColor('b53717'); diff --git a/tests/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php b/tests/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php index 01c9ffa5..d2ae150b 100644 --- a/tests/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/DrawRectangleModifierTest.php @@ -18,7 +18,7 @@ class DrawRectangleModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $rectangle = new Rectangle(300, 200, new Point(14, 14)); $rectangle->setBackgroundColor('ffffff'); diff --git a/tests/Drivers/Gd/Modifiers/FillModifierTest.php b/tests/Drivers/Gd/Modifiers/FillModifierTest.php index a3a488d8..78d0177c 100644 --- a/tests/Drivers/Gd/Modifiers/FillModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/FillModifierTest.php @@ -18,7 +18,7 @@ class FillModifierTest extends TestCase public function testFloodFillColor(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals('0000ff', $image->pickColor(420, 270)->toHex()); $this->assertEquals('ff0000', $image->pickColor(540, 400)->toHex()); $image->modify(new FillModifier(new Color(204, 204, 204), new Point(540, 400))); @@ -28,7 +28,7 @@ class FillModifierTest extends TestCase public function testFillAllColor(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals('0000ff', $image->pickColor(420, 270)->toHex()); $this->assertEquals('ff0000', $image->pickColor(540, 400)->toHex()); $image->modify(new FillModifier(new Color(204, 204, 204))); diff --git a/tests/Drivers/Gd/Modifiers/FlipFlopModifierTest.php b/tests/Drivers/Gd/Modifiers/FlipFlopModifierTest.php index d49dcb08..93279eb5 100644 --- a/tests/Drivers/Gd/Modifiers/FlipFlopModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/FlipFlopModifierTest.php @@ -18,7 +18,7 @@ class FlipFlopModifierTest extends TestCase public function testFlipImage(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals('b4e000', $image->pickColor(0, 0)->toHex()); $image->modify(new FlipModifier()); $this->assertEquals('00000000', $image->pickColor(0, 0)->toHex()); @@ -26,7 +26,7 @@ class FlipFlopModifierTest extends TestCase public function testFlopImage(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals('b4e000', $image->pickColor(0, 0)->toHex()); $image->modify(new FlopModifier()); $this->assertEquals('00000000', $image->pickColor(0, 0)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/GammaModifierTest.php b/tests/Drivers/Gd/Modifiers/GammaModifierTest.php index 183b3311..0a2a9dea 100644 --- a/tests/Drivers/Gd/Modifiers/GammaModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/GammaModifierTest.php @@ -16,7 +16,7 @@ class GammaModifierTest extends TestCase public function testModifier(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $image->modify(new GammaModifier(2.1)); $this->assertEquals('00d5f8', $image->pickColor(0, 0)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/GreyscaleModifierTest.php b/tests/Drivers/Gd/Modifiers/GreyscaleModifierTest.php index 1d8054d3..d825d568 100644 --- a/tests/Drivers/Gd/Modifiers/GreyscaleModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/GreyscaleModifierTest.php @@ -16,7 +16,7 @@ class GreyscaleModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertFalse($image->pickColor(0, 0)->isGreyscale()); $image->modify(new GreyscaleModifier()); $this->assertTrue($image->pickColor(0, 0)->isGreyscale()); diff --git a/tests/Drivers/Gd/Modifiers/InvertModifierTest.php b/tests/Drivers/Gd/Modifiers/InvertModifierTest.php index d5b4f53d..550fdb48 100644 --- a/tests/Drivers/Gd/Modifiers/InvertModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/InvertModifierTest.php @@ -16,7 +16,7 @@ class InvertModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $this->assertEquals('ffa601', $image->pickColor(25, 25)->toHex()); $image->modify(new InvertModifier()); diff --git a/tests/Drivers/Gd/Modifiers/PixelateModifierTest.php b/tests/Drivers/Gd/Modifiers/PixelateModifierTest.php index 3d32419b..7d46f6a8 100644 --- a/tests/Drivers/Gd/Modifiers/PixelateModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/PixelateModifierTest.php @@ -16,7 +16,7 @@ class PixelateModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new PixelateModifier(10)); diff --git a/tests/Drivers/Gd/Modifiers/PlaceModifierTest.php b/tests/Drivers/Gd/Modifiers/PlaceModifierTest.php index fe8627b5..9354bf42 100644 --- a/tests/Drivers/Gd/Modifiers/PlaceModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/PlaceModifierTest.php @@ -16,7 +16,7 @@ class PlaceModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals('febc44', $image->pickColor(300, 25)->toHex()); $image->modify(new PlaceModifier(__DIR__ . '/../../../images/circle.png', 'top-right', 0, 0)); $this->assertEquals('32250d', $image->pickColor(300, 25)->toHex()); diff --git a/tests/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php b/tests/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php index dcb962f6..0b577e6f 100644 --- a/tests/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/RemoveAnimationModifierTest.php @@ -16,7 +16,7 @@ class RemoveAnimationModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('animation.gif'); + $image = $this->readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier(2)); $this->assertEquals(1, count($image)); @@ -25,7 +25,7 @@ class RemoveAnimationModifierTest extends TestCase public function testApplyPercent(): void { - $image = $this->createTestImage('animation.gif'); + $image = $this->readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier('20%')); $this->assertEquals(1, count($image)); diff --git a/tests/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php b/tests/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php index 401451f6..c1818dfd 100644 --- a/tests/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ResizeCanvasModifierTest.php @@ -16,7 +16,7 @@ class ResizeCanvasModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals(16, $image->width()); $this->assertEquals(16, $image->height()); $image->modify(new ResizeCanvasModifier(18, 18, 'ff0', 'center')); diff --git a/tests/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php b/tests/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php index 925093ac..8d356b24 100644 --- a/tests/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ResizeCanvasRelativeModifierTest.php @@ -16,7 +16,7 @@ class ResizeCanvasRelativeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals(16, $image->width()); $this->assertEquals(16, $image->height()); $image->modify(new ResizeCanvasRelativeModifier(2, 2, 'ff0', 'center')); diff --git a/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php b/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php index 69abb71e..7ed1eeb6 100644 --- a/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php @@ -16,7 +16,7 @@ class ResizeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $image->modify(new ResizeModifier(200, 100)); diff --git a/tests/Drivers/Gd/Modifiers/ResolutionModifierTest.php b/tests/Drivers/Gd/Modifiers/ResolutionModifierTest.php index 5c14ca58..39407bbb 100644 --- a/tests/Drivers/Gd/Modifiers/ResolutionModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ResolutionModifierTest.php @@ -16,7 +16,7 @@ class ResolutionModifierTest extends TestCase public function testResolutionChange(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals(72.0, $image->resolution()->x()); $this->assertEquals(72.0, $image->resolution()->y()); $image->modify(new ResolutionModifier(1, 2)); diff --git a/tests/Drivers/Gd/Modifiers/RotateModifierTest.php b/tests/Drivers/Gd/Modifiers/RotateModifierTest.php index 362d94d3..56e9c2a9 100644 --- a/tests/Drivers/Gd/Modifiers/RotateModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/RotateModifierTest.php @@ -16,7 +16,7 @@ class RotateModifierTest extends TestCase public function testRotate(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals(320, $image->width()); $this->assertEquals(240, $image->height()); $image->modify(new RotateModifier(90, 'fff')); diff --git a/tests/Drivers/Gd/Modifiers/SharpenModifierTest.php b/tests/Drivers/Gd/Modifiers/SharpenModifierTest.php index 2dc2ef00..4df2858c 100644 --- a/tests/Drivers/Gd/Modifiers/SharpenModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/SharpenModifierTest.php @@ -16,7 +16,7 @@ class SharpenModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('60ab96', $image->pickColor(15, 14)->toHex()); $image->modify(new SharpenModifier(10)); $this->assertEquals('4daba7', $image->pickColor(15, 14)->toHex()); diff --git a/tests/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php index 70336818..9aa7a6eb 100644 --- a/tests/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/ColorspaceAnalyzerTest.php @@ -13,7 +13,7 @@ class ColorspaceAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new ColorspaceAnalyzer(); $result = $analyzer->analyze($image); $this->assertInstanceOf(ColorspaceInterface::class, $result); diff --git a/tests/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php index 479e8578..ee739792 100644 --- a/tests/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/HeightAnalyzerTest.php @@ -12,7 +12,7 @@ class HeightAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new HeightAnalyzer(); $result = $analyzer->analyze($image); $this->assertEquals(16, $result); diff --git a/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzer.php b/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzer.php index 993055a9..a229fbe4 100644 --- a/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzer.php +++ b/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzer.php @@ -13,7 +13,7 @@ class PixelColorAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new PixelColorAnalyzer(0, 0); $result = $analyzer->analyze($image); $this->assertInstanceOf(ColorInterface::class, $result); diff --git a/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php index 043ee7fc..d0367757 100644 --- a/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/PixelColorAnalyzerTest.php @@ -14,7 +14,7 @@ class PixelColorsAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new PixelColorsAnalyzer(0, 0); $result = $analyzer->analyze($image); $this->assertInstanceOf(Collection::class, $result); diff --git a/tests/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php index 42e5925f..bb3b6238 100644 --- a/tests/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/ProfileAnalyzerTest.php @@ -13,7 +13,7 @@ class ProfleAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new ProfileAnalyzer(); $this->expectException(ColorException::class); $analyzer->analyze($image); diff --git a/tests/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php index 14f77c97..1ad3d77d 100644 --- a/tests/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/ResolutionAnalyzerTest.php @@ -13,7 +13,7 @@ class ResolutionAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new ResolutionAnalyzer(); $result = $analyzer->analyze($image); $this->assertInstanceOf(Resolution::class, $result); diff --git a/tests/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php b/tests/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php index f8532302..601263c9 100644 --- a/tests/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php +++ b/tests/Drivers/Imagick/Analyzers/WidthAnalyzerTest.php @@ -12,7 +12,7 @@ class WidthAnalyzerTest extends TestCase public function testAnalyze(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $analyzer = new WidthAnalyzer(); $result = $analyzer->analyze($image); $this->assertEquals(16, $result); diff --git a/tests/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php b/tests/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php index f0e38bae..55fbae11 100644 --- a/tests/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php +++ b/tests/Drivers/Imagick/Decoders/ImageObjectDecoderTest.php @@ -18,7 +18,7 @@ class ImageObjectDecoderTest extends TestCase public function testDecode(): void { $decoder = new ImageObjectDecoder(); - $result = $decoder->decode($this->createTestImage('blue.gif')); + $result = $decoder->decode($this->readTestImage('blue.gif')); $this->assertInstanceOf(Image::class, $result); } } diff --git a/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php b/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php index 7ea8c5ed..fdc85390 100644 --- a/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php @@ -40,7 +40,7 @@ class BmpEncoderTest extends TestCase public function testEncodeReduced(): void { - $image = $this->createTestImage('gradient.bmp'); + $image = $this->readTestImage('gradient.bmp'); $imagick = $image->core()->native(); $this->assertEquals(15, $imagick->getImageColors()); $encoder = new BmpEncoder(2); diff --git a/tests/Drivers/Imagick/Encoders/GifEncoderTest.php b/tests/Drivers/Imagick/Encoders/GifEncoderTest.php index 9364db96..f0a9e8a8 100644 --- a/tests/Drivers/Imagick/Encoders/GifEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/GifEncoderTest.php @@ -54,7 +54,7 @@ class GifEncoderTest extends TestCase public function testEncodeReduced(): void { - $image = $this->createTestImage('gradient.gif'); + $image = $this->readTestImage('gradient.gif'); $imagick = $image->core()->native(); $this->assertEquals(15, $imagick->getImageColors()); $encoder = new GifEncoder(2); diff --git a/tests/Drivers/Imagick/Encoders/PngEncoderTest.php b/tests/Drivers/Imagick/Encoders/PngEncoderTest.php index 4f5726b7..5d8b2e6e 100644 --- a/tests/Drivers/Imagick/Encoders/PngEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/PngEncoderTest.php @@ -41,7 +41,7 @@ final class PngEncoderTest extends TestCase public function testEncodeReduced(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $imagick = $image->core()->native(); $this->assertEquals(3, $imagick->getImageColors()); $encoder = new PngEncoder(2); diff --git a/tests/Drivers/Imagick/Modifiers/BlurModifierTest.php b/tests/Drivers/Imagick/Modifiers/BlurModifierTest.php index e0f964b9..2396684c 100644 --- a/tests/Drivers/Imagick/Modifiers/BlurModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/BlurModifierTest.php @@ -16,7 +16,7 @@ class BlurModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new BlurModifier(30)); $this->assertEquals('42acb2', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/BrightnessModifierTest.php b/tests/Drivers/Imagick/Modifiers/BrightnessModifierTest.php index c816bd04..5192075d 100644 --- a/tests/Drivers/Imagick/Modifiers/BrightnessModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/BrightnessModifierTest.php @@ -16,7 +16,7 @@ class BrightnessModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new BrightnessModifier(30)); $this->assertEquals('39c9ff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/ColorizeModifierTest.php b/tests/Drivers/Imagick/Modifiers/ColorizeModifierTest.php index 207c16fa..2f964276 100644 --- a/tests/Drivers/Imagick/Modifiers/ColorizeModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ColorizeModifierTest.php @@ -16,7 +16,7 @@ class ColorizeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $image = $image->modify(new ColorizeModifier(100, -100, -100)); $this->assertColor(251, 0, 0, 255, $image->pickColor(5, 5)); $this->assertColor(239, 0, 0, 255, $image->pickColor(15, 15)); diff --git a/tests/Drivers/Imagick/Modifiers/ContainModifierTest.php b/tests/Drivers/Imagick/Modifiers/ContainModifierTest.php index ea069f3b..5cbcf2dc 100644 --- a/tests/Drivers/Imagick/Modifiers/ContainModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ContainModifierTest.php @@ -16,7 +16,7 @@ class ContainModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $result = $image->modify(new ContainModifier(200, 100, 'ff0')); diff --git a/tests/Drivers/Imagick/Modifiers/ContrastModifierTest.php b/tests/Drivers/Imagick/Modifiers/ContrastModifierTest.php index a9deab37..aac38443 100644 --- a/tests/Drivers/Imagick/Modifiers/ContrastModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ContrastModifierTest.php @@ -16,7 +16,7 @@ class ContrastModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new ContrastModifier(30)); $this->assertEquals('00fcff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/CoverModifierTest.php b/tests/Drivers/Imagick/Modifiers/CoverModifierTest.php index cb93666e..a0d66ac9 100644 --- a/tests/Drivers/Imagick/Modifiers/CoverModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/CoverModifierTest.php @@ -16,7 +16,7 @@ class CoverModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $image->modify(new CoverModifier(100, 100, 'center')); diff --git a/tests/Drivers/Imagick/Modifiers/CropModifierTest.php b/tests/Drivers/Imagick/Modifiers/CropModifierTest.php index 96d46225..6889c247 100644 --- a/tests/Drivers/Imagick/Modifiers/CropModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/CropModifierTest.php @@ -16,7 +16,7 @@ class CropModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $image = $image->modify(new CropModifier(200, 200, 0, 0, 'bottom-right')); $this->assertEquals(200, $image->width()); $this->assertEquals(200, $image->height()); diff --git a/tests/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php index 9dd6e7ae..63840c7e 100644 --- a/tests/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/DrawEllipseModifierTest.php @@ -14,7 +14,7 @@ class DrawEllipseModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $drawable = new Ellipse(10, 10, new Point(14, 14)); $drawable->setBackgroundColor('b53717'); diff --git a/tests/Drivers/Imagick/Modifiers/DrawLineModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawLineModifierTest.php index 0d4d3b42..6fbb406e 100644 --- a/tests/Drivers/Imagick/Modifiers/DrawLineModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/DrawLineModifierTest.php @@ -14,7 +14,7 @@ class DrawLineModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $line = new Line(new Point(0, 0), new Point(10, 0), 4); $line->setBackgroundColor('b53517'); diff --git a/tests/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php index 5395c0fb..54247467 100644 --- a/tests/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/DrawPixelModifierTest.php @@ -17,7 +17,7 @@ class DrawPixelModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new DrawPixelModifier(new Point(14, 14), 'ffffff')); $this->assertEquals('ffffff', $image->pickColor(14, 14)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php index 191bd62e..f4384064 100644 --- a/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php @@ -14,7 +14,7 @@ class DrawPolygonModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $drawable = new Polygon([new Point(0, 0), new Point(15, 15), new Point(20, 20)]); $drawable->setBackgroundColor('b53717'); diff --git a/tests/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php index 6d6e53a7..53886edb 100644 --- a/tests/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/DrawRectangleModifierTest.php @@ -14,7 +14,7 @@ class DrawRectangleModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $rectangle = new Rectangle(300, 200, new Point(14, 14)); $rectangle->setBackgroundColor('ffffff'); diff --git a/tests/Drivers/Imagick/Modifiers/FillModifierTest.php b/tests/Drivers/Imagick/Modifiers/FillModifierTest.php index 340034ef..611fbfdb 100644 --- a/tests/Drivers/Imagick/Modifiers/FillModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/FillModifierTest.php @@ -18,7 +18,7 @@ class FillModifierTest extends TestCase public function testFloodFillColor(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals('0000ff', $image->pickColor(420, 270)->toHex()); $this->assertEquals('ff0000', $image->pickColor(540, 400)->toHex()); $image->modify(new FillModifier(new Color(204, 204, 204), new Point(540, 400))); @@ -28,7 +28,7 @@ class FillModifierTest extends TestCase public function testFillAllColor(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals('0000ff', $image->pickColor(420, 270)->toHex()); $this->assertEquals('ff0000', $image->pickColor(540, 400)->toHex()); $image->modify(new FillModifier(new Color(204, 204, 204))); diff --git a/tests/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php b/tests/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php index a2b621d1..236b22bf 100644 --- a/tests/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/FlipFlopModifierTest.php @@ -18,7 +18,7 @@ class FlipFlopModifierTest extends TestCase public function testFlipImage(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals('b4e000', $image->pickColor(0, 0)->toHex()); $image->modify(new FlipModifier()); $this->assertEquals('00000000', $image->pickColor(0, 0)->toHex()); @@ -26,7 +26,7 @@ class FlipFlopModifierTest extends TestCase public function testFlopImage(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals('b4e000', $image->pickColor(0, 0)->toHex()); $image->modify(new FlopModifier()); $this->assertEquals('00000000', $image->pickColor(0, 0)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/GammaModifierTest.php b/tests/Drivers/Imagick/Modifiers/GammaModifierTest.php index 6767ec15..837b6310 100644 --- a/tests/Drivers/Imagick/Modifiers/GammaModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/GammaModifierTest.php @@ -16,7 +16,7 @@ class GammaModifierTest extends TestCase public function testModifier(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $image->modify(new GammaModifier(2.1)); $this->assertEquals('00d5f8', $image->pickColor(0, 0)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php b/tests/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php index e7b58c00..58682656 100644 --- a/tests/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/GreyscaleModifierTest.php @@ -16,7 +16,7 @@ class GreyscaleModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertFalse($image->pickColor(0, 0)->isGreyscale()); $image->modify(new GreyscaleModifier()); $this->assertTrue($image->pickColor(0, 0)->isGreyscale()); diff --git a/tests/Drivers/Imagick/Modifiers/InvertModifierTest.php b/tests/Drivers/Imagick/Modifiers/InvertModifierTest.php index dcc5dd41..a298d32e 100644 --- a/tests/Drivers/Imagick/Modifiers/InvertModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/InvertModifierTest.php @@ -16,7 +16,7 @@ class InvertModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $this->assertEquals('ffa601', $image->pickColor(25, 25)->toHex()); $image->modify(new InvertModifier()); diff --git a/tests/Drivers/Imagick/Modifiers/PixelateModifierTest.php b/tests/Drivers/Imagick/Modifiers/PixelateModifierTest.php index 44aae222..d60ca68f 100644 --- a/tests/Drivers/Imagick/Modifiers/PixelateModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/PixelateModifierTest.php @@ -16,7 +16,7 @@ class PixelateModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex()); $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); $image->modify(new PixelateModifier(10)); diff --git a/tests/Drivers/Imagick/Modifiers/PlaceModifierTest.php b/tests/Drivers/Imagick/Modifiers/PlaceModifierTest.php index b0e52cd3..c02238e6 100644 --- a/tests/Drivers/Imagick/Modifiers/PlaceModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/PlaceModifierTest.php @@ -16,7 +16,7 @@ class PlaceModifierTest extends TestCase public function testColorChange(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals('febc44', $image->pickColor(300, 25)->toHex()); $image->modify(new PlaceModifier(__DIR__ . '/../../../images/circle.png', 'top-right', 0, 0)); $this->assertEquals('33260e', $image->pickColor(300, 25)->toHex()); diff --git a/tests/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php b/tests/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php index a80a229f..6442255f 100644 --- a/tests/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/RemoveAnimationModifierTest.php @@ -16,7 +16,7 @@ class RemoveAnimationModifierTest extends TestCase public function testApply(): void { - $image = $this->createTestImage('animation.gif'); + $image = $this->readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier(2)); $this->assertEquals(1, count($image)); @@ -25,7 +25,7 @@ class RemoveAnimationModifierTest extends TestCase public function testApplyPercent(): void { - $image = $this->createTestImage('animation.gif'); + $image = $this->readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier('20%')); $this->assertEquals(1, count($image)); diff --git a/tests/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php b/tests/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php index da9845df..2b5805bc 100644 --- a/tests/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ResizeCanvasModifierTest.php @@ -16,7 +16,7 @@ class ResizeCanvasModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals(16, $image->width()); $this->assertEquals(16, $image->height()); $image->modify(new ResizeCanvasModifier(18, 18, 'ff0', 'center')); diff --git a/tests/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php b/tests/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php index b827a4e1..4c76cb80 100644 --- a/tests/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ResizeCanvasRelativeModifierTest.php @@ -16,7 +16,7 @@ class ResizeCanvasRelativeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('tile.png'); + $image = $this->readTestImage('tile.png'); $this->assertEquals(16, $image->width()); $this->assertEquals(16, $image->height()); $image->modify(new ResizeCanvasRelativeModifier(2, 2, 'ff0', 'center')); diff --git a/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php b/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php index 85603a91..1139637a 100644 --- a/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php @@ -16,7 +16,7 @@ class ResizeModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('blocks.png'); + $image = $this->readTestImage('blocks.png'); $this->assertEquals(640, $image->width()); $this->assertEquals(480, $image->height()); $image->modify(new ResizeModifier(200, 100)); diff --git a/tests/Drivers/Imagick/Modifiers/ResolutionModifierTest.php b/tests/Drivers/Imagick/Modifiers/ResolutionModifierTest.php index 47d030d5..d20339ba 100644 --- a/tests/Drivers/Imagick/Modifiers/ResolutionModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ResolutionModifierTest.php @@ -16,7 +16,7 @@ class ResolutionModifierTest extends TestCase public function testResolutionChange(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals(72.0, $image->resolution()->x()); $this->assertEquals(72.0, $image->resolution()->y()); $image->modify(new ResolutionModifier(1, 2)); diff --git a/tests/Drivers/Imagick/Modifiers/RotateModifierTest.php b/tests/Drivers/Imagick/Modifiers/RotateModifierTest.php index e64f6a86..62c0216f 100644 --- a/tests/Drivers/Imagick/Modifiers/RotateModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/RotateModifierTest.php @@ -16,7 +16,7 @@ class RotateModifierTest extends TestCase public function testRotate(): void { - $image = $this->createTestImage('test.jpg'); + $image = $this->readTestImage('test.jpg'); $this->assertEquals(320, $image->width()); $this->assertEquals(240, $image->height()); $image->modify(new RotateModifier(90, 'fff')); diff --git a/tests/Drivers/Imagick/Modifiers/SharpenModifierTest.php b/tests/Drivers/Imagick/Modifiers/SharpenModifierTest.php index fe3b0c32..d9c11d7f 100644 --- a/tests/Drivers/Imagick/Modifiers/SharpenModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/SharpenModifierTest.php @@ -16,7 +16,7 @@ class SharpenModifierTest extends TestCase public function testModify(): void { - $image = $this->createTestImage('trim.png'); + $image = $this->readTestImage('trim.png'); $this->assertEquals('60ab96', $image->pickColor(15, 14)->toHex()); $image->modify(new SharpenModifier(10)); $this->assertEquals('4faca6', $image->pickColor(15, 14)->toHex()); diff --git a/tests/Traits/CanCreateGdTestImage.php b/tests/Traits/CanCreateGdTestImage.php index 96f0ef79..a6e8de1c 100644 --- a/tests/Traits/CanCreateGdTestImage.php +++ b/tests/Traits/CanCreateGdTestImage.php @@ -10,7 +10,7 @@ use Intervention\Image\Image; trait CanCreateGdTestImage { - public function createTestImage($filename = 'test.jpg'): Image + public function readTestImage($filename = 'test.jpg'): Image { return (new FilePathImageDecoder())->handle( $this->getTestImagePath($filename) diff --git a/tests/Traits/CanCreateImagickTestImage.php b/tests/Traits/CanCreateImagickTestImage.php index 8ad49366..9196c993 100644 --- a/tests/Traits/CanCreateImagickTestImage.php +++ b/tests/Traits/CanCreateImagickTestImage.php @@ -7,7 +7,7 @@ use Intervention\Image\Image; trait CanCreateImagickTestImage { - public function createTestImage($filename = 'test.jpg'): Image + public function readTestImage($filename = 'test.jpg'): Image { return (new FilePathImageDecoder())->handle( sprintf('%s/../images/%s', __DIR__, $filename)