1
0
mirror of https://github.com/Intervention/image.git synced 2025-02-23 21:55:57 +01:00

24 lines
630 B
PHP
Raw Normal View History

2022-07-13 19:08:02 +02:00
<?php
namespace Intervention\Image\Tests\Geometry;
use Intervention\Image\Geometry\Pixel;
use Intervention\Image\Interfaces\ColorInterface;
use Intervention\Image\Tests\TestCase;
use Mockery;
/**
* @covers \Intervention\Image\Geometry\Pixel
*/
class PixelTest extends TestCase
{
public function testSetGetBackground(): void
{
$color = Mockery::mock(ColorInterface::class);
$pixel = new Pixel($color, 10, 12);
$result = $pixel->withBackground($color);
$this->assertInstanceOf(ColorInterface::class, $pixel->background());
$this->assertInstanceOf(Pixel::class, $result);
}
}