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
ScaffoldFactoryTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Elements\Scaffolds
;
22
23
use
PHPUnit\Framework\TestCase
;
24
use
ILIAS\MetaData\Elements\Data\DataFactoryInterface
;
25
use
ILIAS\MetaData\Structure\Definitions\DefinitionInterface
;
26
use
ILIAS\MetaData\Elements\Data\Type
;
27
use
ILIAS\MetaData\Elements\Data\DataInterface
;
28
use
ILIAS\MetaData\Elements\ElementInterface
;
29
use
ILIAS\MetaData\Elements\NoID
;
30
use
ILIAS\MetaData\Structure\Definitions\NullDefinition
;
31
use
ILIAS\MetaData\Elements\Data\NullDataFactory
;
32
use
ILIAS\MetaData\Elements\RessourceID\NullRessourceIDFactory
;
33
use
ILIAS\MetaData\Elements\SetInterface
;
34
use
ILIAS\MetaData\Elements\RessourceID\NullRessourceID
;
35
36
class
ScaffoldFactoryTest
extends
TestCase
37
{
38
public
function
testCreateScaffold
(): void
39
{
40
$factory =
new
ScaffoldFactory
(
41
new
NullDataFactory
(),
42
new
NullRessourceIDFactory
()
43
);
44
$scaffold = $factory->scaffold(
new
NullDefinition
());
45
46
$this->assertInstanceOf(ElementInterface::class, $scaffold);
47
$this->assertSame(NoID::SCAFFOLD, $scaffold->getMDID());
48
$this->assertSame(Type::NULL, $scaffold->getData()->type());
49
}
50
51
public
function
testCreateSet
(): void
52
{
53
$factory =
new
ScaffoldFactory
(
54
new
NullDataFactory
(),
55
new
NullRessourceIDFactory
()
56
);
57
58
$root_definition =
new
NullDefinition
();
59
$set = $factory->set($root_definition);
60
61
$this->assertInstanceOf(SetInterface::class, $set);
62
$this->assertInstanceOf(NullRessourceID::class, $set->getRessourceID());
63
}
64
}
NullDataFactory
DataFactoryInterface
NullDefinition
ILIAS\MetaData\Elements\Data\NullDataFactory
Definition:
NullDataFactory.php:25
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactoryTest\testCreateScaffold
testCreateScaffold()
Definition:
ScaffoldFactoryTest.php:38
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactoryTest\testCreateSet
testCreateSet()
Definition:
ScaffoldFactoryTest.php:51
ILIAS\MetaData\Elements\RessourceID\NullRessourceIDFactory
Definition:
NullRessourceIDFactory.php:23
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactoryTest
Definition:
ScaffoldFactoryTest.php:36
DataInterface
NullRessourceIDFactory
ILIAS\MetaData\Structure\Definitions\NullDefinition
Definition:
NullDefinition.php:25
ILIAS\MetaData\Elements\Scaffolds\ScaffoldFactory
Definition:
ScaffoldFactory.php:33
SetInterface
ILIAS\MetaData\Elements\Data\Type
Type
Definition:
Type.php:23
ElementInterface
DefinitionInterface
ILIAS\MetaData\Elements\Scaffolds
Definition:
NullScaffoldFactory.php:21
NullRessourceID
ILIAS\MetaData\Elements\NoID
NoID
Definition:
NoID.php:23
TestCase
components
ILIAS
MetaData
tests
Elements
Scaffolds
ScaffoldFactoryTest.php
Generated on Fri Apr 4 2025 23:03:37 for ILIAS by
1.8.13 (using
Doxyfile
)