Definition at line 28 of file SectionInputTest.php.
◆ setUp()
SectionInputTest::setUp |
( |
| ) |
|
◆ testCommonRendering()
SectionInputTest::testCommonRendering |
( |
| ) |
|
◆ testNestedSectionRendering()
SectionInputTest::testNestedSectionRendering |
( |
| ) |
|
Definition at line 94 of file SectionInputTest.php.
References Vendor\Package\$f.
96 $f = $this->getFieldFactory();
97 $inputs_level4 = [
$f->text(
"input3",
"input3 byline")];
98 $section_level4 =
$f->section($inputs_level4,
"Inner Section");
100 $inputs_level3 = [
$f->text(
"input2",
"input2 byline"), $section_level4];
101 $section_level3 =
$f->section($inputs_level3,
"Middle Section");
103 $inputs_level2 = [
$f->text(
"input1",
"input1 byline"), $section_level3];
104 $section_level2 =
$f->section($inputs_level2,
"Outermost Section");
106 $nested_sections_html = $this->render($section_level2);
108 $this->assertStringContainsString(
'<h2>Outermost Section</h2>', $nested_sections_html);
109 $this->assertStringContainsString(
'<h3>Middle Section</h3>', $nested_sections_html);
110 $this->assertStringContainsString(
'<h4>Inner Section</h4>', $nested_sections_html);
◆ testSectionRendering()
SectionInputTest::testSectionRendering |
( |
| ) |
|
Definition at line 39 of file SectionInputTest.php.
References Vendor\Package\$f, ILIAS\UI\Implementation\Component\Input\$inputs, and null.
41 $f = $this->getFieldFactory();
43 $f->text(
"input1",
"in 1"),
44 $f->text(
"input2",
"in 2")
46 $label =
'section label';
47 $byline =
'section byline';
48 $section =
$f->section(
$inputs, $label, $byline)->withNameFrom($this->name_source);
49 $f1 = $this->getFormWrappedHtml(
52 '<input id="id_1" type="text" name="name_0/name_1" class="c-field-text" />',
58 $f2 = $this->getFormWrappedHtml(
61 '<input id="id_2" type="text" name="name_0/name_2" class="c-field-text" />',
67 $expected = $this->getFormWrappedHtml(
68 'section-field-input',
74 $this->assertEquals($expected, $this->render($section));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ $name_source
The documentation for this class was generated from the following file: