5 require_once(
"libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"../../../../Base.php");
8 use \ILIAS\UI\Component as
C;
9 use \ILIAS\UI\Implementation\Component as
I;
32 $this->node_factory =
new I\Tree\Node\Factory();
33 $icon_factory =
new I\Symbol\Icon\Factory();
34 $this->icon = $icon_factory->standard(
"",
'');
39 $node = $this->node_factory->bylined(
'My Label',
'This is my byline', $this->icon);
40 $this->assertEquals(
'My Label', $node->getLabel());
41 $this->assertEquals(
'This is my byline', $node->getByline());
42 $this->assertEquals($this->icon, $node->getIcon());
47 $node = $this->node_factory->bylined(
'My Label',
'This is my byline');
50 $html = $r->render($node);
53 <li
id=
"" class=
"il-tree-node node-simple" role=
"treeitem">
54 <span
class=
"node-line">
55 <span
class=
"node-label">My Label</span>
56 <span
class=
"node-byline">This is my byline</span>
69 $node = $this->node_factory->bylined(
'My Label',
'This is my byline', $this->icon);
72 $html = $r->render($node);
75 <li
id=
"" class=
"il-tree-node node-simple" role=
"treeitem">
76 <span
class=
"node-line">
77 <span
class=
"node-label">
78 <img
class=
"icon small" src=
"./templates/default/images/icon_default.svg" alt=
""/>
81 <span
class=
"node-byline">This is my byline</span>
94 $node = $this->node_factory->bylined(
'My Label',
'This is my byline');
95 $node = $node->withAsyncURL(
'something.de');
98 $html = $r->render($node);
102 class=
"il-tree-node node-simple expandable" 103 role=
"treeitem" aria-expanded=
"false" 104 data-async_url=
"something.de" data-async_loaded=
"false">
105 <span
class=
"node-line">
106 <span
class=
"node-label">My Label</span>
107 <span
class=
"node-byline">This is my byline</span>
109 <ul role=
"group"></ul>
121 $node = $this->node_factory->bylined(
'My Label',
'This is my byline');
122 $node = $node->withAsyncURL(
'something.de')->withExpanded(
true);
125 $html = $r->render($node);
129 class=
"il-tree-node node-simple expandable" 130 role=
"treeitem" aria-expanded=
"true" 131 data-async_url=
"something.de" data-async_loaded=
"false">
132 <span
class=
"node-line">
133 <span
class=
"node-label">My Label</span>
134 <span
class=
"node-byline">This is my byline</span>
136 <ul role=
"group"></ul>
Provides common functionality for UI tests.
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
Tests for the SimpleNode.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])