Tests for the Expandable Tree.
More...
Tests for the Expandable Tree.
Definition at line 66 of file ExpandableTreeTest.php.
◆ brutallyTrimHTML()
ExpandableTreeTest::brutallyTrimHTML |
( |
string |
$html | ) |
|
Definition at line 97 of file ExpandableTreeTest.php.
99 $html = str_replace([
"\n",
"\r",
"\t"],
"", $html);
100 $html = preg_replace(
'# {2,}#',
" ", $html);
◆ getInnerTreePart()
ExpandableTreeTest::getInnerTreePart |
( |
| ) |
|
|
protected |
Definition at line 130 of file ExpandableTreeTest.php.
132 return '<li class="c-tree__node c-tree__node--simple expandable" role="treeitem" aria-expanded="false"> 133 <span class="c-tree__node__line"><span class="c-tree__node__label">1</span></span> 136 <li class="c-tree__node c-tree__node--simple" role="treeitem"> 137 <span class="c-tree__node__line"><span class="c-tree__node__label">1.1</span></span> 139 <li class="c-tree__node c-tree__node--simple expandable" role="treeitem" aria-expanded="false"> 140 <span class="c-tree__node__line"><span class="c-tree__node__label">1.2</span></span> 143 <li class="c-tree__node c-tree__node--simple" role="treeitem"> 144 <span class="c-tree__node__line"><span class="c-tree__node__label">1.2.1</span></span> 150 <li class="c-tree__node c-tree__node--simple" role="treeitem"> 151 <span class="c-tree__node__line"><span class="c-tree__node__label">2</span></span>
◆ getUIFactory()
ExpandableTreeTest::getUIFactory |
( |
| ) |
|
Definition at line 70 of file ExpandableTreeTest.php.
73 public function tree():
I\Tree\Factory
75 return new I\Tree\Factory(
76 new I\Tree\Node\Factory(),
◆ setUp()
ExpandableTreeTest::setUp |
( |
| ) |
|
◆ testRendering()
ExpandableTreeTest::testRendering |
( |
| ) |
|
Definition at line 104 of file ExpandableTreeTest.php.
References $r.
106 $r = $this->getDefaultRenderer();
107 $html =
$r->render($this->tree);
109 $expected =
'<ul id="id_1" class="c-tree" role="tree" aria-label="label">' . $this->
getInnerTreePart() .
'</ul>';
brutallyTrimHTML(string $html)
◆ testRenderingAsSubTree()
ExpandableTreeTest::testRenderingAsSubTree |
( |
| ) |
|
Definition at line 117 of file ExpandableTreeTest.php.
References $r.
119 $r = $this->getDefaultRenderer();
120 $html =
$r->render($this->tree->withIsSubTree(
true));
brutallyTrimHTML(string $html)
◆ $tree
C Tree Tree ExpandableTreeTest::$tree |
|
protected |
The documentation for this class was generated from the following file: