mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 22:12:51 +02:00
Add Drawable improvements & preparation for future features
* Add DrawableFactoryInterface * Add universal Drawable factory class * Add x/y setter methods to PointInterface * Replace Point::class type hints by PointInterface::class
This commit is contained in:
47
tests/Unit/Geometry/Factories/DrawableTest.php
Normal file
47
tests/Unit/Geometry/Factories/DrawableTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Unit\Geometry\Factories;
|
||||
|
||||
use Intervention\Image\Geometry\Factories\BezierFactory;
|
||||
use Intervention\Image\Geometry\Factories\CircleFactory;
|
||||
use Intervention\Image\Geometry\Factories\Drawable;
|
||||
use Intervention\Image\Geometry\Factories\EllipseFactory;
|
||||
use Intervention\Image\Geometry\Factories\LineFactory;
|
||||
use Intervention\Image\Geometry\Factories\PolygonFactory;
|
||||
use Intervention\Image\Geometry\Factories\RectangleFactory;
|
||||
use Intervention\Image\Tests\BaseTestCase;
|
||||
|
||||
final class DrawableTest extends BaseTestCase
|
||||
{
|
||||
public function testBezier(): void
|
||||
{
|
||||
$this->assertInstanceOf(BezierFactory::class, Drawable::bezier());
|
||||
}
|
||||
|
||||
public function testCircle(): void
|
||||
{
|
||||
$this->assertInstanceOf(CircleFactory::class, Drawable::circle());
|
||||
}
|
||||
|
||||
public function testEllipse(): void
|
||||
{
|
||||
$this->assertInstanceOf(EllipseFactory::class, Drawable::ellipse());
|
||||
}
|
||||
|
||||
public function testLine(): void
|
||||
{
|
||||
$this->assertInstanceOf(LineFactory::class, Drawable::line());
|
||||
}
|
||||
|
||||
public function testPolygon(): void
|
||||
{
|
||||
$this->assertInstanceOf(PolygonFactory::class, Drawable::polygon());
|
||||
}
|
||||
|
||||
public function testRectangle(): void
|
||||
{
|
||||
$this->assertInstanceOf(RectangleFactory::class, Drawable::rectangle());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user