mirror of
https://github.com/Intervention/image.git
synced 2025-02-23 21:55:57 +01:00
24 lines
630 B
PHP
24 lines
630 B
PHP
|
<?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);
|
||
|
}
|
||
|
}
|