3 declare(strict_types=1);
21 require_once(
"libs/composer/vendor/autoload.php");
22 require_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'];
withEnvironment($environment)
Configure the Tree with additional information that will be relayed to TreeRecursion.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testWithData(TestingTree $tree)
testConstruction
ITree TreeRecursion $recursion
isSubTree()
Is this only a part of a tree? Needed if parts are loaded async.
withData($data)
Apply data to the Tree.
withHighlightOnNodeClick(bool $highlight_nodes_on_click)
Should a clicked node be highlighted?
This describes a Tree Node.
testWrongTypeConstruction()
getRecursion()
Get the mapping-class.
testWithHighlightOnNodeClick(TestingTree $tree)
testConstruction
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHighlightOnNodeClick()
Is the tree configured to highlight a clicked node?
Dummy-implementation for testing.
Tests for the (Base-)Tree.
testWithEnvironment(TestingTree $tree)
testConstruction
Provides common functionality for UI tests.
withIsSubTree(bool $is_sub)
Set this tree to be a part of a tree.Needed if parts are loaded async.
Interface for mapping data-structures to the Tree.
testGetRecursion(TestingTree $tree)
testConstruction
testWithIsSubTree(TestingTree $tree)
testConstruction
testGetLabel(TestingTree $tree)
testConstruction