1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 01:00:06 +02:00

Optimize tests

This commit is contained in:
Oliver Vogel
2024-12-06 17:32:55 +01:00
parent 69daa96f66
commit b9a16d4df6
120 changed files with 292 additions and 185 deletions

View File

@@ -4,21 +4,20 @@ 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\Interfaces\ColorInterface;
use Intervention\Image\Tests\BaseTestCase;
use Mockery;
#[CoversClass(\Intervention\Image\Geometry\Pixel::class)]
#[CoversClass(Pixel::class)]
final class PixelTest extends BaseTestCase
{
public function testSetGetBackground(): void
{
$color = Mockery::mock(ColorInterface::class);
$pixel = new Pixel($color, 10, 12);
$color = new Color(255, 55, 0);
$pixel = new Pixel(new Color(0, 0, 0), 10, 12);
$result = $pixel->setBackgroundColor($color);
$this->assertInstanceOf(ColorInterface::class, $pixel->backgroundColor());
$this->assertEquals($color, $pixel->backgroundColor());
$this->assertInstanceOf(Pixel::class, $result);
}
}