19 declare(strict_types=1);
21 require_once(
"vendor/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../Base.php");
43 $this->expectException(ArgumentCountError::class);
49 $this->expectException(TypeError::class);
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')]
withEnvironment($environment)
Configure the Tree with additional information that will be relayed to TreeRecursion.
testWithData(TestingTree $tree)
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)
getHighlightOnNodeClick()
Is the tree configured to highlight a clicked node?
Dummy-implementation for testing.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Tests for the (Base-)Tree.
testWithEnvironment(TestingTree $tree)
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)
testWithIsSubTree(TestingTree $tree)
testGetLabel(TestingTree $tree)