3declare(strict_types=1);
21require_once(
"libs/composer/vendor/autoload.php");
22require_once(__DIR__ .
"/../../Base.php");
43 $this->expectException(ArgumentCountError::class);
49 $this->expectException(TypeError::class);
57 public function getChildren($record, $environment =
null): array
62 public function build(
71 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Tree\\Tree", $tree);
81 $this->assertEquals(
"label", $tree->
getLabel());
89 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Tree\\TreeRecursion", $tree->
getRecursion());
97 $env = [
'key1' =>
'val1',
'key2' => 2];
98 $this->assertEquals($env, $tree->
withEnvironment($env)->getEnvironment());
106 $data = [
'entry1',
'entry2'];
withIsSubTree(bool $is_sub)
Set this tree to be a part of a tree.Needed if parts are loaded async.
withHighlightOnNodeClick(bool $highlight_nodes_on_click)
Should a clicked node be highlighted?
withEnvironment($environment)
Configure the Tree with additional information that will be relayed to TreeRecursion.
getHighlightOnNodeClick()
Is the tree configured to highlight a clicked node?
isSubTree()
Is this only a part of a tree? Needed if parts are loaded async.
withData($data)
Apply data to the Tree.
getRecursion()
Get the mapping-class.
Provides common functionality for UI tests.
Dummy-implementation for testing.
Tests for the (Base-)Tree.
testWithHighlightOnNodeClick(TestingTree $tree)
@depends testConstruction
testWithData(TestingTree $tree)
@depends testConstruction
testWrongTypeConstruction()
testGetLabel(TestingTree $tree)
@depends testConstruction
testGetRecursion(TestingTree $tree)
@depends testConstruction
testWithEnvironment(TestingTree $tree)
@depends testConstruction
testWithIsSubTree(TestingTree $tree)
@depends testConstruction
This describes a Tree Node.
Interface for mapping data-structures to the Tree.
This describes a Tree Control.