Completed
Push — master ( 0926c2...16eb90 )
by WEBEWEB
01:52
created

IconRendererTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 5
dl 0
loc 31
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\TestsIcon;
13
14
use WBW\Bundle\CoreBundle\Icon\IconInterface;
15
use WBW\Bundle\CoreBundle\Icon\IconRenderer;
16
use WBW\Bundle\CoreBundle\Tests\AbstractTestCase;
17
18
/**
19
 * Icon renderer test.
20
 *
21
 * @author webeweb <https://github.com/webeweb/>
22
 * @package WBW\Bundle\CoreBundle\TestsIcon
23
 */
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