mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-14 08:23:20 -05:00
test/php: simple new tests
This commit is contained in:
parent
024618e3a5
commit
4c01909cf8
2 changed files with 43 additions and 0 deletions
18
test/php/library/Businessprocess/Html/HtmlTagTest.php
Normal file
18
test/php/library/Businessprocess/Html/HtmlTagTest.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Icinga\Module\Businessprocess\Html;
|
||||
|
||||
use Icinga\Module\Businessprocess\Html\HtmlTag;
|
||||
use Icinga\Module\Businessprocess\Test\BaseTestCase;
|
||||
|
||||
class HtmlTagTest extends BaseTestCase
|
||||
{
|
||||
public function testH1isRendered()
|
||||
{
|
||||
$h1 = HtmlTag::h1('Hea & der');
|
||||
$this->assertEquals(
|
||||
$h1->render(),
|
||||
'<h1>Hea & der</h1>'
|
||||
);
|
||||
}
|
||||
}
|
||||
25
test/php/library/Businessprocess/Html/TextTest.php
Normal file
25
test/php/library/Businessprocess/Html/TextTest.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Icinga\Module\Businessprocess\Html;
|
||||
|
||||
use Icinga\Module\Businessprocess\Html\Text;
|
||||
use Icinga\Module\Businessprocess\Test\BaseTestCase;
|
||||
|
||||
class TextTest extends BaseTestCase
|
||||
{
|
||||
public function testTextIsReturnedAsGiven()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'A & O',
|
||||
Text::create('A & O')->getText()
|
||||
);
|
||||
}
|
||||
|
||||
public function testTextIsEscapedWhenRendered()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'A & O',
|
||||
Text::create('A & O')->render()
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue