From 2e0cbf24082fe6611daa9f8a59116a2a7c319051 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 5 May 2024 11:49:04 +0200 Subject: [PATCH] Add tolerance to test --- tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php | 2 +- tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php b/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php index c169d591..7fcc1b88 100644 --- a/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php +++ b/tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php @@ -35,6 +35,6 @@ final class PlaceModifierTest extends GdTestCase $image = $this->createTestImage(16, 16)->fill('0000ff'); $this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex()); $image->modify(new PlaceModifier($this->getTestResourcePath('exif.jpg'), opacity: 50)); - $this->assertColor(127, 83, 127, 255, $image->pickColor(10, 10), tolerance: 0); + $this->assertColor(127, 83, 127, 255, $image->pickColor(10, 10), tolerance: 1); } } diff --git a/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php b/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php index 80e9cffb..d68f015a 100644 --- a/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php +++ b/tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php @@ -35,6 +35,6 @@ final class PlaceModifierTest extends ImagickTestCase $image = $this->createTestImage(16, 16)->fill('0000ff'); $this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex()); $image->modify(new PlaceModifier($this->getTestResourcePath('exif.jpg'), opacity: 50)); - $this->assertColor(127, 83, 127, 255, $image->pickColor(10, 10), tolerance: 0); + $this->assertColor(127, 83, 127, 255, $image->pickColor(10, 10), tolerance: 1); } }