Definition at line 125 of file AbstractRendererTest.php.
◆ setUp()
AbstractRendererTest::setUp |
( |
| ) |
|
◆ test_bindJavaScript_no_string()
AbstractRendererTest::test_bindJavaScript_no_string |
( |
| ) |
|
Definition at line 200 of file AbstractRendererTest.php.
201 {
202 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRendererWithJS(
203 $this->ui_factory,
204 $this->tpl_factory,
205 $this->lng,
206 $this->js_binding,
208 );
209
210 $g = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph(\
ILIAS\
UI\Component\Symbol\Glyph\Glyph::SETTINGS,
"aria_label");
211
212 $g = $g->withOnLoadCode(function ($id) {
213 return null;
214 });
215
216 try {
218 $this->assertFalse("This should not happen...");
219 }
catch (\LogicException
$e) {
220 $this->assertTrue(true);
221 }
222 }
Class ChatMainBarProvider \MainMenu\Provider.
References Vendor\Package\$e.
◆ test_bindJavaScript_successfull()
AbstractRendererTest::test_bindJavaScript_successfull |
( |
| ) |
|
Definition at line 176 of file AbstractRendererTest.php.
177 {
178 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRendererWithJS(
179 $this->ui_factory,
180 $this->tpl_factory,
181 $this->lng,
182 $this->js_binding,
184 );
185
186 $g = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph(\
ILIAS\
UI\Component\Symbol\Glyph\Glyph::SETTINGS,
"aria_label");
187
188 $ids = array();
189 $g = $g->withOnLoadCode(function ($id) use (&$ids) {
190 $ids[] = $id;
191 return "ID: $id";
192 });
194
195 $this->assertEquals($this->js_binding->ids, $ids);
196 $this->assertEquals(array("id_1"), $ids);
197 $this->assertEquals(array("ID: id_1"), $this->js_binding->on_load_code);
198 }
◆ test_getTemplate_successfull()
AbstractRendererTest::test_getTemplate_successfull |
( |
| ) |
|
Definition at line 136 of file AbstractRendererTest.php.
137 {
138 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRenderer(
139 $this->ui_factory,
140 $this->tpl_factory,
141 $this->lng,
142 $this->js_binding,
144 );
145 $tpl = $r->_getTemplate(
"tpl.glyph.html",
true,
false);
146
147 $expected = array( realpath(__DIR__ . "/../../../src/UI/templates/default/Symbol/tpl.glyph.html")
148 => array(true, false)
149 );
150
151 $this->assertEquals($expected, $this->tpl_factory->files);
152 }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
References $tpl.
◆ test_getTemplate_unsuccessfull()
AbstractRendererTest::test_getTemplate_unsuccessfull |
( |
| ) |
|
Definition at line 154 of file AbstractRendererTest.php.
155 {
156 $r = new \ILIAS\UI\Implementation\Component\Counter\CounterNonAbstractRenderer(
157 $this->ui_factory,
158 $this->tpl_factory,
159 $this->lng,
160 $this->js_binding,
162 );
163
164 try {
165 $tpl = $r->_getTemplate(
"tpl.counter_foo.html",
true,
false);
166 $this->assertFalse("We should not get here");
167 }
catch (\InvalidArgumentException
$e) {
168 };
169
170 $expected = array( realpath(__DIR__ . "/../../src/UI/templates/default/Counter/tpl.counter_foo.html")
171 => array(true, false)
172 );
173 $this->assertEquals($expected, $this->tpl_factory->files);
174 }
References Vendor\Package\$e, and $tpl.
The documentation for this class was generated from the following file: