Tests for the SimpleNode.
More...
Tests for the SimpleNode.
Definition at line 18 of file BylineNodeTest.php.
◆ setUp()
BylineNodeTest::setUp |
( |
| ) |
|
Definition at line 30 of file BylineNodeTest.php.
32 $this->node_factory =
new I\Tree\Node\Factory();
33 $icon_factory =
new I\Symbol\Icon\Factory();
34 $this->icon = $icon_factory->standard(
"",
'');
◆ testCreateBylineNode()
BylineNodeTest::testCreateBylineNode |
( |
| ) |
|
Definition at line 37 of file BylineNodeTest.php.
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());
◆ testRendering()
BylineNodeTest::testRendering |
( |
| ) |
|
Definition at line 45 of file BylineNodeTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), and ILIAS_UI_TestBase\getDefaultRenderer().
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>
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderingExpanded()
BylineNodeTest::testRenderingExpanded |
( |
| ) |
|
Definition at line 119 of file BylineNodeTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), and ILIAS_UI_TestBase\getDefaultRenderer().
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>
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderingWithAsync()
BylineNodeTest::testRenderingWithAsync |
( |
| ) |
|
Definition at line 92 of file BylineNodeTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), and ILIAS_UI_TestBase\getDefaultRenderer().
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>
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ testRenderingWithIcon()
BylineNodeTest::testRenderingWithIcon |
( |
| ) |
|
Definition at line 67 of file BylineNodeTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), and ILIAS_UI_TestBase\getDefaultRenderer().
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>
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ $icon
◆ $node_factory
BylineNodeTest::$node_factory |
|
private |
The documentation for this class was generated from the following file: