Failed Conditions
Pull Request — master (#11)
by Adrien
15:48 queued 12:33
created

ImagineFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFactory() 0 9 1
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
}
27