Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testRender() |
||
13 | { |
||
14 | $gdResource = 'gdResource'; |
||
15 | |||
16 | $graphicResolver = function () use ($gdResource) { |
||
17 | return $gdResource; |
||
18 | }; |
||
19 | |||
20 | $imageManager = m::mock(ImageManager::class) |
||
21 | ->shouldReceive('make') |
||
22 | ->with($gdResource) |
||
23 | ->getMock(); |
||
24 | |||
25 | $renderer = m::mock(StaticGraphicRenderer::class) |
||
26 | ->shouldAllowMockingProtectedMethods() |
||
27 | ->shouldReceive('getGraphicResolver') |
||
28 | ->andReturn($graphicResolver) |
||
29 | ->shouldReceive('getGraphic') |
||
30 | ->andReturn('pathToGraphic') |
||
31 | ->shouldReceive('getImageManager') |
||
32 | ->andReturn($imageManager) |
||
33 | ->getMock() |
||
34 | ->makePartial(); |
||
35 | |||
36 | $renderer->render(); |
||
37 | } |
||
38 | } |
||
39 |