ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
DefinitionTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Structure\Definitions
;
22
23
use
PHPUnit\Framework\TestCase
;
24
use
ILIAS\MetaData\Elements\Data\Type
;
25
26
class
DefinitionTest
extends
TestCase
27
{
28
public
function
testName
(): void
29
{
30
$definition =
new
Definition
(
'some name'
,
false
,
Type::NULL
);
31
$this->assertSame(
32
'some name'
,
33
$definition->name()
34
);
35
}
36
37
public
function
testUnique
(): void
38
{
39
$definition =
new
Definition
(
''
,
false
,
Type::NULL
);
40
$this->assertFalse($definition->unique());
41
$definition =
new
Definition
(
''
,
true
,
Type::NULL
);
42
$this->assertTrue($definition->unique());
43
}
44
45
public
function
testDataType
(): void
46
{
47
$definition =
new
Definition
(
''
,
false
,
Type::NULL
);
48
$this->assertSame(
49
Type::NULL
,
50
$definition->dataType()
51
);
52
$definition =
new
Definition
(
''
,
false
, Type::STRING);
53
$this->assertSame(
54
Type::STRING,
55
$definition->dataType()
56
);
57
$definition =
new
Definition
(
''
,
false
, Type::VOCAB_SOURCE);
58
$this->assertSame(
59
Type::VOCAB_SOURCE,
60
$definition->dataType()
61
);
62
}
63
}
ILIAS\Data\Description\NULL
Definition:
ValueType.php:30
ILIAS\MetaData\Structure\Definitions\DefinitionTest\testDataType
testDataType()
Definition:
DefinitionTest.php:45
ILIAS\MetaData\Structure\Definitions\Definition
Definition:
Definition.php:25
ILIAS\MetaData\Elements\Data\Type
Type
Definition:
Type.php:23
ILIAS\MetaData\Structure\Definitions\DefinitionTest\testUnique
testUnique()
Definition:
DefinitionTest.php:37
ILIAS\MetaData\Structure\Definitions\DefinitionTest\testName
testName()
Definition:
DefinitionTest.php:28
ILIAS\MetaData\Structure\Definitions
Definition:
Definition.php:21
ILIAS\MetaData\Structure\Definitions\DefinitionTest
Definition:
DefinitionTest.php:26
TestCase
components
ILIAS
MetaData
tests
Structure
Definitions
DefinitionTest.php
Generated on Wed Sep 3 2025 23:02:51 for ILIAS by
1.8.13 (using
Doxyfile
)