mirror of
https://github.com/Intervention/image.git
synced 2025-09-09 05:30:40 +02:00
Add Geometry\Pixel::class
This commit is contained in:
23
tests/Geometry/PixelTest.php
Normal file
23
tests/Geometry/PixelTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user