Definition at line 6 of file ilCtrlStructureTest.php.
◆ setUp()
ilCtrlStructureTest::setUp |
( |
| ) |
|
|
protected |
◆ testAddClassChild()
ilCtrlStructureTest::testAddClassChild |
( |
| ) |
|
Definition at line 42 of file ilCtrlStructureTest.php.
44 $this->ctrl_structure = $this->ctrl_structure
45 ->withClassChild(
"parent1",
"child1")
46 ->withClassChild(
"parent2",
"child2")
47 ->withClassChild(
"parent1",
"child3");
50 "parent1" => [
"child1",
"child3"],
51 "parent2" => [
"child2"]
56 iterator_to_array($this->ctrl_structure->getClassChildren())
◆ testAddClassScript()
ilCtrlStructureTest::testAddClassScript |
( |
| ) |
|
Definition at line 13 of file ilCtrlStructureTest.php.
15 $this->ctrl_structure = $this->ctrl_structure
16 ->withClassScript(
"class1",
"file1")
17 ->withClassScript(
"class2",
"file2")
18 ->withClassScript(
"class3",
"file3")
19 ->withClassScript(
"class2",
"file2");
29 iterator_to_array($this->ctrl_structure->getClassScripts())
◆ testAddClassScriptPanicsOnDuplicate()
ilCtrlStructureTest::testAddClassScriptPanicsOnDuplicate |
( |
| ) |
|
Definition at line 33 of file ilCtrlStructureTest.php.
35 $this->expectException(\RuntimeException::class);
38 ->withClassScript(
"class1",
"file1")
39 ->withClassScript(
"class1",
"file2");
◆ testConstructor()
ilCtrlStructureTest::testConstructor |
( |
| ) |
|
Definition at line 60 of file ilCtrlStructureTest.php.
69 "parent1" => [
"child1",
"child3"],
70 "parent2" => [
"child2"]
73 $ctrl_structure = new \ilCtrlStructure($scripts, $children);
77 iterator_to_array($ctrl_structure->getClassScripts())
82 iterator_to_array($ctrl_structure->getClassChildren())
◆ testGetClassScriptOf()
ilCtrlStructureTest::testGetClassScriptOf |
( |
| ) |
|
Definition at line 86 of file ilCtrlStructureTest.php.
94 $ctrl_structure = new \ilCtrlStructure($scripts, []);
96 $this->assertEquals(
"file1", $ctrl_structure->getClassScriptOf(
"class1"));
97 $this->assertEquals(
"file2", $ctrl_structure->getClassScriptOf(
"class2"));
98 $this->assertEquals(
"file3", $ctrl_structure->getClassScriptOf(
"class3"));
99 $this->assertSame(null, $ctrl_structure->getClassScriptOf(
"class4"));
The documentation for this class was generated from the following file: