Definition at line 29 of file StructureElementTest.php.
◆ getDefinition()
ILIAS\MetaData\Elements\Structure\StructureElementTest::getDefinition |
( |
string |
$name | ) |
|
|
protected |
Definition at line 31 of file StructureElementTest.php.
31 : DefinitionInterface
32 {
33 return new class ($name) extends NullDefinition {
35 {
36 }
37
38 public function name(): string
39 {
40 return $this->name;
41 }
42 };
43 }
__construct()
Constructor setup ILIAS global object @access public.
References ILIAS\__construct().
◆ getStructureElement()
ILIAS\MetaData\Elements\Structure\StructureElementTest::getStructureElement |
( |
bool |
$is_root, |
|
|
string |
$name, |
|
|
StructureElement ... |
$elements |
|
) |
| |
|
protected |
Definition at line 45 of file StructureElementTest.php.
49 : StructureElement {
50 return new StructureElement(
51 $is_root,
53 ...$elements
54 );
55 }
◆ testMDIDAndIsRoot()
ILIAS\MetaData\Elements\Structure\StructureElementTest::testMDIDAndIsRoot |
( |
| ) |
|
◆ testSubAndSuperElements()
ILIAS\MetaData\Elements\Structure\StructureElementTest::testSubAndSuperElements |
( |
| ) |
|
Definition at line 57 of file StructureElementTest.php.
57 : void
58 {
63
64 $subs = $root->getSubElements();
65 $this->assertSame($struct1, $subs->current());
66 $subs->next();
67 $this->assertSame($struct2, $subs->current());
68 $subs->next();
69 $this->assertNull($subs->current());
70
71 $this->assertSame($root, $struct1->getSuperElement());
72 $this->assertSame($struct11, $struct1->getSubElements()->current());
73 }
◆ testSubElementByName()
ILIAS\MetaData\Elements\Structure\StructureElementTest::testSubElementByName |
( |
| ) |
|
Definition at line 87 of file StructureElementTest.php.
87 : void
88 {
93
94 $this->assertSame($sub2, $el->getSubElement('sub 2'));
95 $this->assertSame($sub3, $el->getSubElement('sub 3'));
96 $this->assertSame($sub1, $el->getSubElement('sub 1'));
97 $this->assertNull($el->getSubElement('something else'));
98 }
The documentation for this class was generated from the following file: