ILIAS
trunk Revision v11.0_alpha-1713-gd8962da2f67
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
FactoryTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Elements
;
22
23
use
PHPUnit\Framework\TestCase
;
24
use
ILIAS\MetaData\Elements\Data\DataFactoryInterface
;
25
use
ILIAS\MetaData\Elements\Data\Type
;
26
use
ILIAS\MetaData\Elements\Data\DataInterface
;
27
use
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
;
28
use
ILIAS\MetaData\Elements\RessourceID\RessourceIDInterface
;
29
use
ILIAS\MetaData\Structure\Definitions\NullDefinition
;
30
use
ILIAS\MetaData\Elements\Data\NullDataFactory
;
31
use
ILIAS\MetaData\Elements\RessourceID\NullRessourceID
;
32
33
class
FactoryTest
extends
TestCase
34
{
35
public
function
testCreateElement
(): void
36
{
37
$factory =
new
Factory
(
new
NullDataFactory
());
38
$el = $factory->element(13,
new
NullDefinition
(),
'value'
);
39
40
$this->assertInstanceOf(Element::class, $el);
41
$this->assertFalse($el->isRoot());
42
$this->assertFalse($el->isScaffold());
43
}
44
45
public
function
testCreateRoot
(): void
46
{
47
$factory =
new
Factory
(
new
NullDataFactory
());
48
$root = $factory->root(
new
NullDefinition
());
49
50
$this->assertInstanceOf(ElementInterface::class, $root);
51
$this->assertTrue($root->isRoot());
52
$this->assertFalse($root->isScaffold());
53
}
54
55
public
function
testCreateSet
(): void
56
{
57
$factory =
new
Factory
(
new
NullDataFactory
());
58
$root = $factory->root(
new
NullDefinition
());
59
$set = $factory->set(
new
NullRessourceID
(), $root);
60
61
$this->assertInstanceOf(SetInterface::class, $set);
62
}
63
}
ILIAS\MetaData\Elements\FactoryTest\testCreateSet
testCreateSet()
Definition:
FactoryTest.php:55
NullDataFactory
DataFactoryInterface
NullDefinition
ILIAS\MetaData\Elements\Data\NullDataFactory
Definition:
NullDataFactory.php:25
DataInterface
ILIAS\MetaData\Elements\FactoryTest\testCreateElement
testCreateElement()
Definition:
FactoryTest.php:35
ILIAS\MetaData\Structure\Definitions\NullDefinition
Definition:
NullDefinition.php:25
ILIAS\MetaData\Elements\FactoryTest\testCreateRoot
testCreateRoot()
Definition:
FactoryTest.php:45
RessourceIDInterface
ILIAS\MetaData\Elements\RessourceID\NullRessourceID
Definition:
NullRessourceID.php:23
ILIAS\MetaData\Elements\Data\Type
Type
Definition:
Type.php:23
ILIAS\MetaData\Elements
DefinitionInterface
ILIAS\MetaData\Elements\FactoryTest
Definition:
FactoryTest.php:33
ILIAS\MetaData\Elements\Factory
Definition:
Factory.php:30
NullRessourceID
TestCase
components
ILIAS
MetaData
tests
Elements
FactoryTest.php
Generated on Fri Apr 4 2025 23:03:37 for ILIAS by
1.8.13 (using
Doxyfile
)