1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-26 07:14:31 +02:00

Add tests

This commit is contained in:
Oliver Vogel
2024-05-20 10:30:14 +02:00
parent 25058825c2
commit 7b8b9e1e93
2 changed files with 23 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\ResolutionInterface;
use Intervention\Image\Interfaces\SizeInterface;
use Intervention\Image\Modifiers\GreyscaleModifier;
use Intervention\Image\Origin;
use Intervention\Image\Tests\ImagickTestCase;
final class ImageTest extends ImagickTestCase
@@ -96,6 +97,16 @@ final class ImageTest extends ImagickTestCase
$this->assertEquals(10, $this->image->loops());
}
public function testSetGetOrigin(): void
{
$origin = $this->image->origin();
$this->assertInstanceOf(Origin::class, $origin);
$this->image->setOrigin(new Origin('test1', 'test2'));
$this->assertInstanceOf(Origin::class, $this->image->origin());
$this->assertEquals('test1', $this->image->origin()->mimetype());
$this->assertEquals('test2', $this->image->origin()->filePath());
}
public function testRemoveAnimation(): void
{
$this->assertTrue($this->image->isAnimated());