Definition at line 30 of file HiddenInputTest.php.
◆ setUp()
HiddenInputTest::setUp |
( |
| ) |
|
Definition at line 37 of file HiddenInputTest.php.
40 $this->input =
new I\Input\Field\Hidden(
44 $this->createMock(
ILIAS\Language\Language::class)
Interface Observer Contains several chained tasks and infos about them.
◆ testCommonRendering()
HiddenInputTest::testCommonRendering |
( |
| ) |
|
Definition at line 90 of file HiddenInputTest.php.
References Vendor\Package\$f.
92 $f = $this->getFieldFactory();
93 $hidden =
$f->hidden()->withNameFrom($this->name_source);
95 $this->testWithNoByline($hidden);
96 $this->testWithAdditionalOnloadCodeRendersId($hidden);
◆ testRender()
HiddenInputTest::testRender |
( |
| ) |
|
Definition at line 49 of file HiddenInputTest.php.
References $r.
51 $input = $this->input->withNameFrom($this->name_source);
53 $r = $this->getDefaultRenderer();
54 $html = $this->brutallyTrimHTML(
$r->render(
$input));
56 $expected = $this->brutallyTrimHTML(
' 57 <input id="id_1" type="hidden" name="name_0" value="" /> 59 $this->assertEquals($expected, $html);
◆ testRenderDisabled()
HiddenInputTest::testRenderDisabled |
( |
| ) |
|
Definition at line 62 of file HiddenInputTest.php.
References $r.
64 $input = $this->input->withNameFrom($this->name_source);
67 $r = $this->getDefaultRenderer();
68 $html = $this->brutallyTrimHTML(
$r->render(
$input));
70 $expected = $this->brutallyTrimHTML(
' 71 <input id="id_1" type="hidden" name="name_0" value="" disabled="disabled"/> 73 $this->assertEquals($expected, $html);
◆ testRenderEscaped()
HiddenInputTest::testRenderEscaped |
( |
| ) |
|
Definition at line 99 of file HiddenInputTest.php.
101 $expected = $this->brutallyTrimHTML(
' 102 <input id="id_1" type="hidden" name="name_0" value="<script>alert("XSS");</script>" /> 104 $actual = $this->brutallyTrimHTML(
105 $this->getDefaultRenderer()->render(
106 $this->input->withNameFrom($this->name_source)->withValue(
'<script>alert("XSS");</script>')
109 $this->assertEquals($expected, $actual);
◆ testRenderValue()
HiddenInputTest::testRenderValue |
( |
| ) |
|
Definition at line 76 of file HiddenInputTest.php.
References $r.
78 $input = $this->input->withNameFrom($this->name_source);
81 $r = $this->getDefaultRenderer();
82 $html = $this->brutallyTrimHTML(
$r->render(
$input));
84 $expected = $this->brutallyTrimHTML(
' 85 <input id="id_1" type="hidden" name="name_0" value="some_value" /> 87 $this->assertEquals($expected, $html);
◆ $input
I Input Field Hidden HiddenInputTest::$input |
|
protected |
◆ $name_source
The documentation for this class was generated from the following file: