◆ setUp()
| KSDocumentationTreeRecursionTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 39 of file KSDocumentationTreeRecursionTest.php.
39 : void
40 {
42
43 $this->entries_data = include './components/ILIAS/UI/tests/Crawler/Fixture/EntriesFixture.php';
44 $this->entries = new Entries();
45 $this->entries->addEntriesFromArray($this->entries_data);
46 $this->test_uri =
new URI(
'http://ilias.de');
48 }
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 64 of file KSDocumentationTreeRecursionTest.php.
64 : void
65 {
66 $tree_factory = $this->ui_helper->factory()->tree()->node();
67 $built_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
68 $this->assertInstanceOf('ILIAS\UI\Implementation\Component\Tree\Node\Simple', $built_node);
69 }
◆ testConstruct()
| KSDocumentationTreeRecursionTest::testConstruct |
( |
| ) |
|
◆ testGetChildren()
| KSDocumentationTreeRecursionTest::testGetChildren |
( |
| ) |
|
Definition at line 55 of file KSDocumentationTreeRecursionTest.php.
55 : void
56 {
57 $this->assertEquals(
58 [$this->entries->getEntryById('Entry2')],
59 $this->tree_recursion->getChildren($this->entries->getEntryById('Entry1'))
60 );
61 $this->assertEquals([], $this->tree_recursion->getChildren($this->entries->getEntryById('Entry2')));
62 }
◆ testIsNodeExpandedAfterActivatingEntry2()
| KSDocumentationTreeRecursionTest::testIsNodeExpandedAfterActivatingEntry2 |
( |
| ) |
|
Definition at line 93 of file KSDocumentationTreeRecursionTest.php.
93 : void
94 {
96
97 $tree_factory = $this->ui_helper->factory()->tree()->node();
98 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
99 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
100
101 $this->assertEquals(true, $built_root_node->isExpanded());
102 $this->assertEquals(false, $built_child_node->isExpanded());
103 }
◆ testIsNodeExpandedByDefault()
| KSDocumentationTreeRecursionTest::testIsNodeExpandedByDefault |
( |
| ) |
|
Definition at line 71 of file KSDocumentationTreeRecursionTest.php.
71 : void
72 {
73 $tree_factory = $this->ui_helper->factory()->tree()->node();
74 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
75 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
76
77 $this->assertEquals(true, $built_root_node->isExpanded());
78 $this->assertEquals(false, $built_child_node->isExpanded());
79 }
◆ testIsNodeHighlightedAfterActivatingEntry()
| KSDocumentationTreeRecursionTest::testIsNodeHighlightedAfterActivatingEntry |
( |
| ) |
|
Definition at line 105 of file KSDocumentationTreeRecursionTest.php.
105 : void
106 {
108
109 $tree_factory = $this->ui_helper->factory()->tree()->node();
110 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
111 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
112
113 $this->assertEquals(false, $built_root_node->isHighlighted());
114 $this->assertEquals(true, $built_child_node->isHighlighted());
115 }
◆ testIsNodeHighlightedByDefault()
| KSDocumentationTreeRecursionTest::testIsNodeHighlightedByDefault |
( |
| ) |
|
Definition at line 81 of file KSDocumentationTreeRecursionTest.php.
81 : void
82 {
84
85 $tree_factory = $this->ui_helper->factory()->tree()->node();
86 $built_root_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry1'));
87 $built_child_node = $this->tree_recursion->build($tree_factory, $this->entries->getEntryById('Entry2'));
88
89 $this->assertEquals(false, $built_root_node->isHighlighted());
90 $this->assertEquals(true, $built_child_node->isHighlighted());
91 }
◆ $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: