for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Graze\CiffRenderer\Test\Unit\Renderer\GraphicResolver;
use Mockery as m;
use Urbanplum\Bmp\Bmp;
use Graze\CiffRenderer\Renderer\GraphicResolver\GraphicResolverFilePath;
class GraphicResolverFilePathTest extends \PHPUnit_Framework_TestCase
{
public function testInvoke()
$filePath = '/path/to/font';
$resourceExpected = 'resource';
$bmp = m::mock(Bmp::class)
->shouldReceive('create')
->with($filePath)
->andReturn($resourceExpected)
->once()
->getMock();
$graphicResolver = new GraphicResolverFilePath($bmp);
$resourceActual = $graphicResolver($filePath);
$this->assertEquals($resourceExpected, $resourceActual);
}