Completed
Branch master (4d68bf)
by John
02:46
created

GraphicResolverFilePathTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
namespace Graze\CiffRenderer\Test\Unit\GraphicResolver;
4
5
use Mockery as m;
6
use Urbanplum\Bmp\Bmp;
7
use Graze\CiffRenderer\GraphicResolver\GraphicResolverFilePath;
8
9
class GraphicResolverFilePathTest extends \PHPUnit_Framework_TestCase
10
{
11
    public function testInvoke()
12
    {
13
        $filePath = '/path/to/font';
14
        $resourceExpected = 'resource';
15
        $bmp = m::mock(Bmp::class)
16
            ->shouldReceive('createFromFile')
17
            ->with($filePath)
18
            ->andReturn($resourceExpected)
19
            ->once()
20
            ->getMock();
21
22
        $graphicResolver = new GraphicResolverFilePath($bmp);
23
        $resourceActual = $graphicResolver($filePath);
24
25
        $this->assertEquals($resourceExpected, $resourceActual);
26
    }
27
}
28