5 require_once(__DIR__.
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__.
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
25 return new \ILIAS\UI\Implementation\Component\Panel\Factory();
32 return new \ILIAS\UI\Implementation\Factory();
36 $f = $this->getPanelFactory();
38 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Factory", $f);
39 $this->assertInstanceOf
40 (
"ILIAS\\UI\\Component\\Panel\\Standard" 43 $this->assertInstanceOf
44 (
"ILIAS\\UI\\Component\\Panel\\Sub" 47 $this->assertInstanceOf
48 (
"ILIAS\\UI\\Component\\Panel\\Report" 54 $f = $this->getPanelFactory();
57 $this->assertEquals($p->getTitle(),
"Title");
61 $f = $this->getPanelFactory();
63 $p = $f->standard(
"Title",
array($c));
65 $this->assertEquals($p->getContent(),
array($c));
70 $fp = $this->getPanelFactory();
71 $f = $this->getFactory();
75 $card = $f->card(
"Card Title");
77 $p = $p->withCard($card);
79 $this->assertEquals($p->getCard(), $card);
83 $f = $this->getPanelFactory();
85 $p = $f->report(
"Title",
array($sub));
87 $this->assertEquals($p->getTitle(),
"Title");
91 $f = $this->getPanelFactory();
93 $p = $f->report(
"Title",$sub);
95 $this->assertEquals($p->getContent(),
array($sub));
100 $f = $this->getPanelFactory();
101 $r = $this->getDefaultRenderer();
102 $p = $f->standard(
"Title",
array());
105 $html->formatOutput =
true;
106 $html->preserveWhiteSpace =
false;
109 $expected->formatOutput =
true;
110 $expected->preserveWhiteSpace =
false;
115 "<div class=\"panel panel-primary\">".
116 " <div class=\"panel-heading ilHeader\">".
117 " <h3 class=\"ilHeader\">Title</h3>".
119 " <div class=\"panel-body\"></div>".
122 $this->assertHTMLEquals($expected_html,
$html);
126 $f = $this->getFactory();
127 $fp = $this->getPanelFactory();
128 $r = $this->getDefaultRenderer();
129 $p = $fp->sub(
"Title",
array());
130 $card = $f->card(
"Card Title");
131 $p = $p->withCard($card);
135 "<div class=\"panel panel-primary\">".
136 " <div class=\"panel-heading ilBlockHeader\">".
139 " <div class=\"panel-body\"><div class=\"row\">".
140 " <div class=\"col-sm-8\"></div>".
141 " <div class=\"col-sm-4\">".
142 " <div class=\"il-card thumbnail\"><div class=\"caption\"><h5 class=\"card-title\">Card Title</h5></div></div>".
147 $this->assertHTMLEquals($expected_html,
$html);
150 $f = $this->getFactory();
151 $fp = $this->getPanelFactory();
152 $r = $this->getDefaultRenderer();
153 $sub = $fp->sub(
"Title",
array());
154 $card = $f->card(
"Card Title");
155 $sub = $sub->withCard($card);
156 $report = $fp->report(
"Title",$sub);
161 "<div class=\"panel panel-primary il-panel-report\">".
162 " <div class=\"panel-heading ilHeader\">".
163 "<h3 class=\"ilHeader\">Title</h3>".
165 " <div class=\"panel-body\">".
167 <div class=\"panel panel-primary\">".
168 " <div class=\"panel-heading ilBlockHeader\">".
171 " <div class=\"panel-body\"><div class=\"row\">".
172 " <div class=\"col-sm-8\"></div>".
173 " <div class=\"col-sm-4\">".
174 " <div class=\"il-card thumbnail\"><div class=\"caption\"><h5 class=\"card-title\">Card Title</h5></div></div>".
181 $this->assertHTMLEquals($expected_html,
$html);
test_implements_factory_interface()
test_standard_get_content()
test_standard_get_title()
Test on button implementation.
A component is the most general form of an entity in the UI.
Provides common functionality for UI tests.
Create styles array
The data for the language used.
test_report_get_content()