ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
StructureSetTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Elements\Structure
;
22
23
use PHPUnit\Framework\TestCase;
24
use
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
;
25
use
ILIAS\MetaData\Elements\Data\Type
;
26
use
ILIAS\MetaData\Elements\NoID
;
27
28
class
StructureSetTest
extends
TestCase
29
{
30
protected
function
getRoot
():
StructureElementInterface
31
{
32
return
new
class
() extends
NullStructureElement
{
33
public
function
getMDID():
NoID
34
{
35
return
NoID::ROOT;
36
}
37
38
public
function
isRoot():
bool
39
{
40
return
true
;
41
}
42
};
43
}
44
45
public
function
testGetRoot
(): void
46
{
47
$root = $this->
getRoot
();
48
$set =
new
StructureSet
($root);
49
50
$this->assertSame($root, $set->getRoot());
51
}
52
}
ILIAS\MetaData\Elements\Structure\NullStructureElement
Definition:
NullStructureElement.php:29
ILIAS\MetaData\Elements\Structure\StructureSetTest
Definition:
StructureSetTest.php:29
ILIAS\MetaData\Elements\Structure\StructureSetTest\getRoot
getRoot()
Definition:
StructureSetTest.php:30
ILIAS\MetaData\Elements\Structure\StructureSetTest\testGetRoot
testGetRoot()
Definition:
StructureSetTest.php:45
ILIAS\MetaData\Elements\Structure\StructureSet
Definition:
StructureSet.php:26
ILIAS\MetaData\Elements\Structure\StructureElementInterface
Definition:
StructureElementInterface.php:27
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
Definition:
DefinitionInterface.php:26
ILIAS\MetaData\Elements\Data\Type
Type
Definition:
Type.php:24
ILIAS\MetaData\Elements\Structure
Definition:
NullStructureElement.php:21
ILIAS\MetaData\Elements\NoID
NoID
Definition:
NoID.php:24
components
ILIAS
MetaData
tests
Elements
Structure
StructureSetTest.php
Generated on Sun Oct 19 2025 23:03:20 for ILIAS by
1.9.4 (using
Doxyfile
)