Definition at line 180 of file AbstractRendererTest.php.
◆ setUp()
| AbstractRendererTest::setUp |
( |
| ) |
|
◆ test_bindJavaScript_no_string()
| AbstractRendererTest::test_bindJavaScript_no_string |
( |
| ) |
|
Definition at line 269 of file AbstractRendererTest.php.
269 : void
270 {
272 $this->ui_factory,
273 $this->tpl_factory,
275 $this->js_binding,
277 $this->image_path_resolver,
279 );
280
281 $g =
new Glyph(
C\Symbol\
Glyph\Glyph::SETTINGS,
"aria_label");
282
283 $g = $g->withOnLoadCode(
function (
$id) {
284 return null;
285 });
286
287 try {
289 $this->assertFalse("This should not happen...");
290 }
catch (LogicException
$e) {
291 $this->assertTrue(true);
292 }
293 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
References Vendor\Package\$e, $id, ILIAS\UI\Implementation\Component\Input\getDataFactory(), and ILIAS\Repository\lng().
◆ test_bindJavaScript_successfull()
| AbstractRendererTest::test_bindJavaScript_successfull |
( |
| ) |
|
Definition at line 243 of file AbstractRendererTest.php.
243 : void
244 {
246 $this->ui_factory,
247 $this->tpl_factory,
249 $this->js_binding,
251 $this->image_path_resolver,
253 );
254
255 $g =
new Glyph(
C\Symbol\
Glyph\Glyph::SETTINGS,
"aria_label");
256
257 $ids = array();
258 $g = $g->withOnLoadCode(
function (
$id) use (&$ids) {
260 return "ID: $id";
261 });
263
264 $this->assertEquals($this->js_binding->ids, $ids);
265 $this->assertEquals(array("id_1"), $ids);
266 $this->assertEquals(array("ID: id_1"), $this->js_binding->on_load_code);
267 }
References $id, ILIAS\UI\Implementation\Component\Input\getDataFactory(), and ILIAS\Repository\lng().
◆ test_getTemplate_successfull()
| AbstractRendererTest::test_getTemplate_successfull |
( |
| ) |
|
Definition at line 202 of file AbstractRendererTest.php.
202 : void
203 {
205 $this->ui_factory,
206 $this->tpl_factory,
208 $this->js_binding,
210 $this->image_path_resolver,
212 );
213 $r->_getTemplate("tpl.glyph.html", true, false);
214
215 $expected = array(realpath(__DIR__ . "/../../../src/UI/templates/default/Symbol/tpl.glyph.html")
216 => array(true, false)
217 );
218
219 $this->assertEquals($expected, $this->tpl_factory->files);
220 }
References ILIAS\UI\Implementation\Component\Input\getDataFactory(), and ILIAS\Repository\lng().
◆ test_getTemplate_unsuccessfull()
| AbstractRendererTest::test_getTemplate_unsuccessfull |
( |
| ) |
|
Definition at line 222 of file AbstractRendererTest.php.
222 : void
223 {
225 $this->ui_factory,
226 $this->tpl_factory,
228 $this->js_binding,
230 $this->image_path_resolver,
232 );
233
234 $this->expectException(TypeError::class);
235 $r->_getTemplate("tpl.counter_foo.html", true, false);
236
237 $expected = array(realpath(__DIR__ . "/../../src/UI/templates/default/Counter/tpl.counter_foo.html")
238 => array(true, false)
239 );
240 $this->assertEquals($expected, $this->tpl_factory->files);
241 }
References ILIAS\UI\Implementation\Component\Input\getDataFactory(), and ILIAS\Repository\lng().
◆ $image_path_resolver
| AbstractRendererTest::$image_path_resolver |
|
protected |
◆ $js_binding
◆ $lng
◆ $tpl_factory
◆ $ui_factory
The documentation for this class was generated from the following file: