1 | <?php |
||
24 | class IconRendererTest extends AbstractTestCase { |
||
25 | |||
26 | /** |
||
27 | * Icon. |
||
28 | * |
||
29 | * @var IconInterface |
||
30 | */ |
||
31 | private $icon; |
||
32 | |||
33 | /** |
||
34 | * {@inheritDoc} |
||
35 | */ |
||
36 | protected function setUp(): void { |
||
37 | parent::setUp(); |
||
38 | |||
39 | // Set an Icon mock. |
||
40 | $this->icon = $this->getMockBuilder(IconInterface::class)->getMock(); |
||
41 | $this->icon->expects($this->any())->method("getStyle")->willReturn("color: #000000;"); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Tests the renderStyle() method. |
||
46 | * |
||
47 | * @return void. |
||
48 | */ |
||
49 | public function testRenderStyle(): void { |
||
50 | |||
51 | $res = IconRenderer::renderStyle($this->icon); |
||
52 | $this->assertEquals("color: #000000;", $res); |
||
53 | } |
||
54 | } |
||
55 |