19declare(strict_types=1);
21require_once(
"vendor/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);
76 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
79 $this->assertEquals(
"label", $tree->
getLabel());
82 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
85 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Tree\\TreeRecursion", $tree->
getRecursion());
88 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
91 $env = [
'key1' =>
'val1',
'key2' => 2];
92 $this->assertEquals($env, $tree->
withEnvironment($env)->getEnvironment());
95 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
98 $data = [
'entry1',
'entry2'];
102 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
109 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
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)
testWithData(TestingTree $tree)
testWrongTypeConstruction()
testGetLabel(TestingTree $tree)
testGetRecursion(TestingTree $tree)
testWithEnvironment(TestingTree $tree)
testWithIsSubTree(TestingTree $tree)
This describes a Tree Node.
Interface for mapping data-structures to the Tree.
This describes a Tree Control.