5require_once(
"libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"../../../../Base.php");
8use \ILIAS\UI\Component as
C;
9use \ILIAS\UI\Implementation\Component as I;
18 $this->node_factory =
new I\Tree\Node\Factory();
19 $icon_factory =
new I\Symbol\Icon\Factory();
20 $this->icon = $icon_factory->standard(
"",
'');
25 $html = str_replace([
"\n",
"\r",
"\t"],
"", $html);
26 $html = preg_replace(
'# {2,}#',
" ", $html);
32 $node = $this->node_factory->simple(
'simple');
33 $this->assertInstanceOf(
34 "ILIAS\\UI\\Component\\Tree\\Node\\Simple",
42 $this->expectException(\ArgumentCountError::class);
43 $node = $this->node_factory->simple();
48 $node = $this->node_factory->simple(
'label', $this->icon);
49 $this->assertInstanceOf(
50 "ILIAS\\UI\\Component\\Tree\\Node\\Simple",
85 $node->getAsyncLoading()
94 $url =
'something.de';
95 $node = $node->withAsyncURL(
$url);
97 $node->getAsyncLoading()
112 $html = $r->render($node);
115 <li
id=
"" class=
"il-tree-node node-simple" role=
"none">
116 <span
class=
"node-line">
117 <span
class=
"node-label">
simple</span>
134 $html = $r->render($node);
138 class=
"il-tree-node node-simple expandable"
139 role=
"treeitem" aria-expanded=
"false"
140 data-async_url=
"something.de" data-async_loaded=
"false">
141 <span
class=
"node-line">
142 <span
class=
"node-label">
simple</span>
159 $html = $r->render($node);
162 <li
id=
"" class=
"il-tree-node node-simple" role=
"none">
163 <span
class=
"node-line">
164 <span
class=
"node-label"><div
class=
"icon small" aria-label=
""></div>label</span>
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
getDefaultRenderer(JavaScriptBinding $js_binding=null)
Tests for the SimpleNode.
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
testRendering($node)
@depends testConstruction
testGetLabel($node)
@depends testConstructionWithIcon
testRenderingWithAsync($node)
@depends testWithAsyncURL
testDefaultAsyncLoading($node)
@depends testConstruction
testWithAsyncURL($node)
@depends testConstruction
testGetIcon($node)
@depends testConstructionWithIcon
testConstructionWithIcon()
testRenderingWithIcon($node)
@depends testConstructionWithIcon