1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-23 05:52:47 +02:00
Files
intervention_image/tests/Unit/Geometry/PixelTest.php
Oliver Vogel b9a16d4df6 Optimize tests
2024-12-07 11:38:33 +01:00

24 lines
661 B
PHP

<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Geometry;
use Intervention\Image\Colors\Rgb\Color;
use PHPUnit\Framework\Attributes\CoversClass;
use Intervention\Image\Geometry\Pixel;
use Intervention\Image\Tests\BaseTestCase;
#[CoversClass(Pixel::class)]
final class PixelTest extends BaseTestCase
{
public function testSetGetBackground(): void
{
$color = new Color(255, 55, 0);
$pixel = new Pixel(new Color(0, 0, 0), 10, 12);
$result = $pixel->setBackgroundColor($color);
$this->assertEquals($color, $pixel->backgroundColor());
$this->assertInstanceOf(Pixel::class, $result);
}
}