1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-01 18:02:45 +02:00

Add tests to reproduce bug

This commit is contained in:
Oliver Vogel
2024-05-05 13:06:57 +02:00
parent 2e0cbf2408
commit 72f455b2de
2 changed files with 20 additions and 0 deletions

View File

@@ -25,4 +25,14 @@ final class DrawLineModifierTest extends ImagickTestCase
$image->modify(new DrawLineModifier($line));
$this->assertEquals('b53517', $image->pickColor(0, 0)->toHex());
}
public function testApplyTransparent(): void
{
$image = $this->createTestImage(10, 10)->fill('ff5500');
$this->assertColor(255, 85, 0, 255, $image->pickColor(5, 5));
$line = new Line(new Point(0, 5), new Point(10, 5), 4);
$line->setBackgroundColor('fff4');
$image->modify(new DrawLineModifier($line));
$this->assertColor(255, 136, 77, 255, $image->pickColor(5, 5));
}
}