ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ 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
Definition:
NullStructureElement.php:21
ILIAS\MetaData\Elements\Structure\StructureSetTest
Definition:
StructureSetTest.php:28
ILIAS\MetaData\Elements\Structure\StructureSetTest\testGetRoot
testGetRoot()
Definition:
StructureSetTest.php:45
ILIAS\MetaData\Elements\Data\Type
Type
Definition:
Type.php:23
ILIAS\MetaData\Elements\Structure\StructureSetTest\getRoot
getRoot()
Definition:
StructureSetTest.php:30
ILIAS\MetaData\Elements\Structure\StructureSet
Definition:
StructureSet.php:25
DefinitionInterface
ILIAS\MetaData\Elements\Structure\NullStructureElement
Definition:
NullStructureElement.php:28
ILIAS\MetaData\Elements\NoID
NoID
Definition:
NoID.php:23
TestCase
ILIAS\MetaData\Elements\Structure\StructureElementInterface
Definition:
StructureElementInterface.php:26
components
ILIAS
MetaData
tests
Elements
Structure
StructureSetTest.php
Generated on Wed Sep 3 2025 23:03:30 for ILIAS by
1.8.13 (using
Doxyfile
)