mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
Refactor test code
This commit is contained in:
@@ -373,12 +373,12 @@ final class ImageTest extends ImagickTestCase
|
|||||||
$result = $image->pixelate(10);
|
$result = $image->pixelate(10);
|
||||||
$this->assertInstanceOf(ImageInterface::class, $result);
|
$this->assertInstanceOf(ImageInterface::class, $result);
|
||||||
|
|
||||||
list($r, $g, $b) = $image->pickColor(0, 0)->toArray();
|
[$r, $g, $b] = $image->pickColor(0, 0)->toArray();
|
||||||
$this->assertEquals(0, $r);
|
$this->assertEquals(0, $r);
|
||||||
$this->assertEquals(174, $g);
|
$this->assertEquals(174, $g);
|
||||||
$this->assertEquals(240, $b);
|
$this->assertEquals(240, $b);
|
||||||
|
|
||||||
list($r, $g, $b) = $image->pickColor(14, 14)->toArray();
|
[$r, $g, $b] = $image->pickColor(14, 14)->toArray();
|
||||||
$this->assertEquals(107, $r);
|
$this->assertEquals(107, $r);
|
||||||
$this->assertEquals(171, $g);
|
$this->assertEquals(171, $g);
|
||||||
$this->assertEquals(140, $b);
|
$this->assertEquals(140, $b);
|
||||||
|
@@ -21,12 +21,12 @@ final class PixelateModifierTest extends ImagickTestCase
|
|||||||
$this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex());
|
$this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex());
|
||||||
$image->modify(new PixelateModifier(10));
|
$image->modify(new PixelateModifier(10));
|
||||||
|
|
||||||
list($r, $g, $b) = $image->pickColor(0, 0)->toArray();
|
[$r, $g, $b] = $image->pickColor(0, 0)->toArray();
|
||||||
$this->assertEquals(0, $r);
|
$this->assertEquals(0, $r);
|
||||||
$this->assertEquals(174, $g);
|
$this->assertEquals(174, $g);
|
||||||
$this->assertEquals(240, $b);
|
$this->assertEquals(240, $b);
|
||||||
|
|
||||||
list($r, $g, $b) = $image->pickColor(14, 14)->toArray();
|
[$r, $g, $b] = $image->pickColor(14, 14)->toArray();
|
||||||
$this->assertEquals(107, $r);
|
$this->assertEquals(107, $r);
|
||||||
$this->assertEquals(171, $g);
|
$this->assertEquals(171, $g);
|
||||||
$this->assertEquals(140, $b);
|
$this->assertEquals(140, $b);
|
||||||
|
Reference in New Issue
Block a user