mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-20 23:00:16 -05:00
43 lines
996 B
PHP
43 lines
996 B
PHP
<?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 testTextIsRenderedAsGivenWhenDeclaredBeingEscaped()
|
|
{
|
|
$this->assertEquals(
|
|
'A & O',
|
|
Text::create('A & O')->setEscaped()->render()
|
|
);
|
|
|
|
$this->assertEquals(
|
|
'A & O',
|
|
Text::create('A & O')->setEscaped(true)->render()
|
|
);
|
|
|
|
$this->assertEquals(
|
|
'A & O',
|
|
Text::create('A & O')->setEscaped(false)->render()
|
|
);
|
|
}
|
|
|
|
public function testTextIsEscapedWhenRendered()
|
|
{
|
|
$this->assertEquals(
|
|
'A & O',
|
|
Text::create('A & O')->render()
|
|
);
|
|
}
|
|
}
|