Skip to content

Commit 517a819

Browse files
committed
Basic tests for Imagine
1 parent c0e75bc commit 517a819

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace EcodevTests\Felix\Service;
6+
7+
use Ecodev\Felix\Service\ImagineFactory;
8+
use Imagine\Image\Box;
9+
use Imagine\Image\ImageInterface;
10+
use Imagine\Image\ImagineInterface;
11+
use Interop\Container\ContainerInterface;
12+
use PHPUnit\Framework\TestCase;
13+
14+
class ImagineFactoryTest extends TestCase
15+
{
16+
public function testFactory(): void
17+
{
18+
$factory = new ImagineFactory();
19+
20+
$actual = $factory($this->createMock(ContainerInterface::class), '');
21+
self::assertInstanceOf(ImagineInterface::class, $actual);
22+
23+
$image = $actual->create(new Box(10, 10));
24+
self::assertInstanceOf(ImageInterface::class, $image);
25+
}
26+
}

0 commit comments

Comments
 (0)