From f4cd289e91063dc4c3d59122d7641c8efe855f83 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 17 Dec 2023 16:42:16 +0100 Subject: [PATCH] Rename method --- tests/Drivers/Gd/Encoders/AvifEncoderTest.php | 2 +- tests/Drivers/Gd/Encoders/BmpEncoderTest.php | 2 +- tests/Drivers/Gd/Encoders/GifEncoderTest.php | 2 +- tests/Drivers/Gd/Encoders/JpegEncoderTest.php | 2 +- tests/Drivers/Gd/Encoders/PngEncoderTest.php | 2 +- tests/Drivers/Gd/Encoders/WebpEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/AvifEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/BmpEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/GifEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/JpegEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/PngEncoderTest.php | 2 +- tests/Drivers/Imagick/Encoders/WebpEncoderTest.php | 2 +- tests/TestCase.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/Drivers/Gd/Encoders/AvifEncoderTest.php b/tests/Drivers/Gd/Encoders/AvifEncoderTest.php index 78021a12..464c019b 100644 --- a/tests/Drivers/Gd/Encoders/AvifEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/AvifEncoderTest.php @@ -30,6 +30,6 @@ class AvifEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new AvifEncoder(10); $result = $encoder->encode($image); - $this->assertMimeType('image/avif', (string) $result); + $this->assertMediaType('image/avif', (string) $result); } } diff --git a/tests/Drivers/Gd/Encoders/BmpEncoderTest.php b/tests/Drivers/Gd/Encoders/BmpEncoderTest.php index a1a70990..8067c0f8 100644 --- a/tests/Drivers/Gd/Encoders/BmpEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/BmpEncoderTest.php @@ -30,6 +30,6 @@ class BmpEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new BmpEncoder(); $result = $encoder->encode($image); - $this->assertMimeType(['image/bmp', 'image/x-ms-bmp'], (string) $result); + $this->assertMediaType(['image/bmp', 'image/x-ms-bmp'], (string) $result); } } diff --git a/tests/Drivers/Gd/Encoders/GifEncoderTest.php b/tests/Drivers/Gd/Encoders/GifEncoderTest.php index 377ae144..fb4bc541 100644 --- a/tests/Drivers/Gd/Encoders/GifEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/GifEncoderTest.php @@ -44,6 +44,6 @@ class GifEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new GifEncoder(); $result = $encoder->encode($image); - $this->assertMimeType('image/gif', (string) $result); + $this->assertMediaType('image/gif', (string) $result); } } diff --git a/tests/Drivers/Gd/Encoders/JpegEncoderTest.php b/tests/Drivers/Gd/Encoders/JpegEncoderTest.php index 7befa558..a9c649b6 100644 --- a/tests/Drivers/Gd/Encoders/JpegEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/JpegEncoderTest.php @@ -30,6 +30,6 @@ class JpegEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new JpegEncoder(75); $result = $encoder->encode($image); - $this->assertMimeType('image/jpeg', (string) $result); + $this->assertMediaType('image/jpeg', (string) $result); } } diff --git a/tests/Drivers/Gd/Encoders/PngEncoderTest.php b/tests/Drivers/Gd/Encoders/PngEncoderTest.php index 54f9e5f2..d6f3ca8a 100644 --- a/tests/Drivers/Gd/Encoders/PngEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/PngEncoderTest.php @@ -33,6 +33,6 @@ class PngEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new PngEncoder(); $result = $encoder->encode($image); - $this->assertMimeType('image/png', (string) $result); + $this->assertMediaType('image/png', (string) $result); } } diff --git a/tests/Drivers/Gd/Encoders/WebpEncoderTest.php b/tests/Drivers/Gd/Encoders/WebpEncoderTest.php index 3f1ba724..86736ae1 100644 --- a/tests/Drivers/Gd/Encoders/WebpEncoderTest.php +++ b/tests/Drivers/Gd/Encoders/WebpEncoderTest.php @@ -31,6 +31,6 @@ final class WebpEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new WebpEncoder(75); $result = $encoder->encode($image); - $this->assertMimeType('image/webp', (string) $result); + $this->assertMediaType('image/webp', (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/AvifEncoderTest.php b/tests/Drivers/Imagick/Encoders/AvifEncoderTest.php index c8e640cf..3a92abba 100644 --- a/tests/Drivers/Imagick/Encoders/AvifEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/AvifEncoderTest.php @@ -32,6 +32,6 @@ class AvifEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new AvifEncoder(10); $result = $encoder->encode($image); - $this->assertMimeType('image/avif', (string) $result); + $this->assertMediaType('image/avif', (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php b/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php index 59aaacc0..e22f95bc 100644 --- a/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/BmpEncoderTest.php @@ -35,6 +35,6 @@ class BmpEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new BmpEncoder(); $result = $encoder->encode($image); - $this->assertMimeType(['image/bmp', 'image/x-ms-bmp'], (string) $result); + $this->assertMediaType(['image/bmp', 'image/x-ms-bmp'], (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/GifEncoderTest.php b/tests/Drivers/Imagick/Encoders/GifEncoderTest.php index 177c5f43..9989f4d0 100644 --- a/tests/Drivers/Imagick/Encoders/GifEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/GifEncoderTest.php @@ -49,6 +49,6 @@ class GifEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new GifEncoder(); $result = $encoder->encode($image); - $this->assertMimeType('image/gif', (string) $result); + $this->assertMediaType('image/gif', (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/JpegEncoderTest.php b/tests/Drivers/Imagick/Encoders/JpegEncoderTest.php index dfc2b680..533306d7 100644 --- a/tests/Drivers/Imagick/Encoders/JpegEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/JpegEncoderTest.php @@ -32,6 +32,6 @@ class JpegEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new JpegEncoder(75); $result = $encoder->encode($image); - $this->assertMimeType('image/jpeg', (string) $result); + $this->assertMediaType('image/jpeg', (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/PngEncoderTest.php b/tests/Drivers/Imagick/Encoders/PngEncoderTest.php index 584aadf4..08cff0f6 100644 --- a/tests/Drivers/Imagick/Encoders/PngEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/PngEncoderTest.php @@ -36,6 +36,6 @@ final class PngEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new PngEncoder(75); $result = $encoder->encode($image); - $this->assertMimeType('image/png', (string) $result); + $this->assertMediaType('image/png', (string) $result); } } diff --git a/tests/Drivers/Imagick/Encoders/WebpEncoderTest.php b/tests/Drivers/Imagick/Encoders/WebpEncoderTest.php index fb96d957..9397665a 100644 --- a/tests/Drivers/Imagick/Encoders/WebpEncoderTest.php +++ b/tests/Drivers/Imagick/Encoders/WebpEncoderTest.php @@ -33,6 +33,6 @@ final class WebpEncoderTest extends TestCase $image = $this->getTestImage(); $encoder = new WebpEncoder(75); $result = $encoder->encode($image); - $this->assertMimeType('image/webp', (string) $result); + $this->assertMediaType('image/webp', (string) $result); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index f40ecea7..da94a058 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -31,7 +31,7 @@ abstract class TestCase extends MockeryTestCase $this->assertEquals(0, $channel->value()); } - protected function assertMimeType(string|array $allowed, string $input): void + protected function assertMediaType(string|array $allowed, string $input): void { $pointer = fopen('php://temp', 'rw'); fputs($pointer, $input);