Definition at line 125 of file AbstractRendererTest.php.
◆ setUp()
AbstractRendererTest::setUp |
( |
| ) |
|
Reimplemented from ILIAS_UI_TestBase.
Definition at line 127 of file AbstractRendererTest.php.
127 : void
128 {
129 parent::setUp();
134 $this->image_path_resolver = $this->getMockBuilder(
ILIAS\
UI\Implementation\Render\ImagePathResolver::class)
135 ->getMock();
136 }
Class ChatMainBarProvider \MainMenu\Provider.
◆ test_bindJavaScript_no_string()
AbstractRendererTest::test_bindJavaScript_no_string |
( |
| ) |
|
Definition at line 205 of file AbstractRendererTest.php.
206 {
207 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRendererWithJS(
208 $this->ui_factory,
209 $this->tpl_factory,
210 $this->lng,
211 $this->js_binding,
213 $this->image_path_resolver
214 );
215
216 $g = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph(\
ILIAS\
UI\Component\Symbol\Glyph\Glyph::SETTINGS,
"aria_label");
217
218 $g = $g->withOnLoadCode(function ($id) {
219 return null;
220 });
221
222 try {
224 $this->assertFalse("This should not happen...");
225 }
catch (\LogicException
$e) {
226 $this->assertTrue(true);
227 }
228 }
References Vendor\Package\$e.
◆ test_bindJavaScript_successfull()
AbstractRendererTest::test_bindJavaScript_successfull |
( |
| ) |
|
Definition at line 180 of file AbstractRendererTest.php.
181 {
182 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRendererWithJS(
183 $this->ui_factory,
184 $this->tpl_factory,
185 $this->lng,
186 $this->js_binding,
188 $this->image_path_resolver
189 );
190
191 $g = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph(\
ILIAS\
UI\Component\Symbol\Glyph\Glyph::SETTINGS,
"aria_label");
192
193 $ids = array();
194 $g = $g->withOnLoadCode(function ($id) use (&$ids) {
195 $ids[] = $id;
196 return "ID: $id";
197 });
199
200 $this->assertEquals($this->js_binding->ids, $ids);
201 $this->assertEquals(array("id_1"), $ids);
202 $this->assertEquals(array("ID: id_1"), $this->js_binding->on_load_code);
203 }
◆ test_getTemplate_successfull()
AbstractRendererTest::test_getTemplate_successfull |
( |
| ) |
|
Definition at line 138 of file AbstractRendererTest.php.
139 {
140 $r = new \ILIAS\UI\Implementation\Component\Symbol\Glyph\GlyphNonAbstractRenderer(
141 $this->ui_factory,
142 $this->tpl_factory,
143 $this->lng,
144 $this->js_binding,
146 $this->image_path_resolver
147 );
148 $tpl = $r->_getTemplate(
"tpl.glyph.html",
true,
false);
149
150 $expected = array( realpath(__DIR__ . "/../../../src/UI/templates/default/Symbol/tpl.glyph.html")
151 => array(true, false)
152 );
153
154 $this->assertEquals($expected, $this->tpl_factory->files);
155 }
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
References $tpl.
◆ test_getTemplate_unsuccessfull()
AbstractRendererTest::test_getTemplate_unsuccessfull |
( |
| ) |
|
Definition at line 157 of file AbstractRendererTest.php.
158 {
159 $r = new \ILIAS\UI\Implementation\Component\Counter\CounterNonAbstractRenderer(
160 $this->ui_factory,
161 $this->tpl_factory,
162 $this->lng,
163 $this->js_binding,
165 $this->image_path_resolver
166 );
167
168 try {
169 $tpl = $r->_getTemplate(
"tpl.counter_foo.html",
true,
false);
170 $this->assertFalse("We should not get here");
171 }
catch (\InvalidArgumentException
$e) {
172 };
173
174 $expected = array( realpath(__DIR__ . "/../../src/UI/templates/default/Counter/tpl.counter_foo.html")
175 => array(true, false)
176 );
177 $this->assertEquals($expected, $this->tpl_factory->files);
178 }
References Vendor\Package\$e, and $tpl.
The documentation for this class was generated from the following file: