mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 07:14:31 +02:00
Add tolerance to test
This commit is contained in:
@@ -35,6 +35,6 @@ final class PlaceModifierTest extends GdTestCase
|
|||||||
$image = $this->createTestImage(16, 16)->fill('0000ff');
|
$image = $this->createTestImage(16, 16)->fill('0000ff');
|
||||||
$this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex());
|
$this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex());
|
||||||
$image->modify(new PlaceModifier($this->getTestResourcePath('exif.jpg'), opacity: 50));
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,6 @@ final class PlaceModifierTest extends ImagickTestCase
|
|||||||
$image = $this->createTestImage(16, 16)->fill('0000ff');
|
$image = $this->createTestImage(16, 16)->fill('0000ff');
|
||||||
$this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex());
|
$this->assertEquals('0000ff', $image->pickColor(10, 10)->toHex());
|
||||||
$image->modify(new PlaceModifier($this->getTestResourcePath('exif.jpg'), opacity: 50));
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user