icingaweb2-module-businessp.../test/php/library/Businessprocess/Html/HtmlTest.php
2016-11-27 23:55:01 +01:00

42 lines
997 B
PHP

<?php
namespace Tests\Icinga\Module\Businessprocess\Html;
use Icinga\Module\Businessprocess\Html\Html;
use Icinga\Module\Businessprocess\Test\BaseTestCase;
class HtmlTest extends BaseTestCase
{
public function testContentIsRendered()
{
$h = new Html();
$h->setContent('Some content');
$this->assertEquals(
'Some content',
$h->render()
);
}
public function testContentCanBeExtended()
{
$h = new Html();
$h->setContent('Some content');
$h->addContent('More content');
$this->assertEquals(
'Some contentMore content',
$h->render()
);
}
public function testSeparatorsAreRespected()
{
$h = new Html();
$h->setContent('Some content');
$h->setSeparator(', and ');
$h->addContent('More content');
$this->assertEquals(
'Some content, and More content',
$h->render()
);
}
}