◆ setUp()
KSDocumentationTreeRecursionTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 40 of file KSDocumentationTreeRecursionTest.php.
40 : void
41 {
43
44 $this->entries_data = include './components/ILIAS/UI/tests/Crawler/Fixture/EntriesFixture.php';
45 $this->entries = new Entries();
46 $this->entries->addEntriesFromArray($this->entries_data);
47 $this->test_uri =
new URI(
'http://ilias.de');
49 }
trait UITestHelper
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...
The scope of this class is split ilias-conform URI's into components.
Tree Recursion, putting Entries into a Tree.
References UITestHelper.
◆ testBuild()
KSDocumentationTreeRecursionTest::testBuild |
( |
| ) |
|
Definition at line 65 of file KSDocumentationTreeRecursionTest.php.
65 : void
66 {
67 $tree_factory = $this->ui_helper->factory()->tree()->node();
68 $built_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
69 $this->assertInstanceOf('ILIAS\UI\Implementation\Component\Tree\Node\Simple', $built_node);
70 }
◆ testConstruct()
KSDocumentationTreeRecursionTest::testConstruct |
( |
| ) |
|
◆ testGetChildren()
KSDocumentationTreeRecursionTest::testGetChildren |
( |
| ) |
|
Definition at line 56 of file KSDocumentationTreeRecursionTest.php.
56 : void
57 {
58 $this->assertEquals(
59 [$this->entries->getEntryById('Entry2')],
60 $this->tree_recursion->getChildren($this->entries->getEntryById('Entry1'))
61 );
62 $this->assertEquals([], $this->tree_recursion->getChildren($this->entries->getEntryById('Entry2')));
63 }
◆ testIsNodeExpandedAfterActivatingEntry2()
KSDocumentationTreeRecursionTest::testIsNodeExpandedAfterActivatingEntry2 |
( |
| ) |
|
Definition at line 94 of file KSDocumentationTreeRecursionTest.php.
94 : void
95 {
97
98 $tree_factory = $this->ui_helper->factory()->tree()->node();
99 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
100 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
101
102 $this->assertEquals(true, $built_root_node->isExpanded());
103 $this->assertEquals(false, $built_child_node->isExpanded());
104 }
◆ testIsNodeExpandedByDefault()
KSDocumentationTreeRecursionTest::testIsNodeExpandedByDefault |
( |
| ) |
|
Definition at line 72 of file KSDocumentationTreeRecursionTest.php.
72 : void
73 {
74 $tree_factory = $this->ui_helper->factory()->tree()->node();
75 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
76 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
77
78 $this->assertEquals(true, $built_root_node->isExpanded());
79 $this->assertEquals(false, $built_child_node->isExpanded());
80 }
◆ testIsNodeHighlightedAfterActivatingEntry()
KSDocumentationTreeRecursionTest::testIsNodeHighlightedAfterActivatingEntry |
( |
| ) |
|
Definition at line 106 of file KSDocumentationTreeRecursionTest.php.
106 : void
107 {
109
110 $tree_factory = $this->ui_helper->factory()->tree()->node();
111 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
112 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
113
114 $this->assertEquals(false, $built_root_node->isHighlighted());
115 $this->assertEquals(true, $built_child_node->isHighlighted());
116 }
◆ testIsNodeHighlightedByDefault()
KSDocumentationTreeRecursionTest::testIsNodeHighlightedByDefault |
( |
| ) |
|
Definition at line 82 of file KSDocumentationTreeRecursionTest.php.
82 : void
83 {
85
86 $tree_factory = $this->ui_helper->factory()->tree()->node();
87 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
88 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
89
90 $this->assertEquals(false, $built_root_node->isHighlighted());
91 $this->assertEquals(true, $built_child_node->isHighlighted());
92 }
◆ $entries
Entries KSDocumentationTreeRecursionTest::$entries |
|
protected |
◆ $entries_data
KSDocumentationTreeRecursionTest::$entries_data |
|
protected |
◆ $entry
Entry KSDocumentationTreeRecursionTest::$entry |
|
protected |
◆ $entry_data
array KSDocumentationTreeRecursionTest::$entry_data |
|
protected |
◆ $test_uri
URI KSDocumentationTreeRecursionTest::$test_uri |
|
protected |
◆ $tree_recursion
◆ $ui_helper
The documentation for this class was generated from the following file: