Completed
Pull Request — master (#7)
by Paweł
16:44
created

HtmlWidgetTest::testRendering()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Templates System
5
 *
6
 * Copyright 2015 Sourcefabric z.u. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2015 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\TemplatesSystem\Tests\Gimme\Container;
16
17
use SWP\TemplatesSystem\Tests\Gimme\Model\Widget;
18
use SWP\TemplatesSystem\Gimme\Widget\HtmlWidget;
19
20
class HtmlWidgetTest extends \PHPUnit_Framework_TestCase
21
{
22
    private $widget;
23
24
    public function setUp()
25
    {
26
    	$widgetEntity = new Widget();
27
    	$widgetEntity->setId(1);
28
        $widgetEntity->setParameters(['html_body' => 'simple html body']);
29
30
        $this->widget = new HtmlWidget($widgetEntity);
31
    }
32
33
    public function testcheckingVisibility()
34
    {
35
        $this->assertTrue($this->widget->isVisible());
36
    }
37
38
    public function testRendering()
39
    {
40
        $this->assertEquals($this->widget->render(), 'simple html body');
41
    }
42
}
43