Skip to content

Commit

Permalink
Add tolerance to test
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed May 5, 2024
1 parent 41f2c96 commit 2e0cbf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/Unit/Drivers/Gd/Modifiers/PlaceModifierTest.php
Expand Up @@ -35,6 +35,6 @@ public function testColorChangeOpacityJpeg(): void
$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);
}
}
2 changes: 1 addition & 1 deletion tests/Unit/Drivers/Imagick/Modifiers/PlaceModifierTest.php
Expand Up @@ -35,6 +35,6 @@ public function testColorChangeOpacityJpeg(): void
$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);
}
}

0 comments on commit 2e0cbf2

Please sign in to comment.