ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
+
Files
File List
+
Globals
+
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
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
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
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
MetaDataTest.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\GlobalScreen\Scope\Layout
;
4
5
use
PHPUnit\Framework\TestCase
;
6
use
ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaContent
;
7
use
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css
;
8
use
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\InlineCss
;
9
use
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Js
;
10
use
ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaData\MetaDatum
;
11
12
require_once(
'./libs/composer/vendor/autoload.php'
);
13
19
class
MetaDataTest
extends
TestCase
20
{
24
public
$meta_content
;
25
26
protected
function
setUp
() : void
27
{
28
parent::setUp();
29
$this->meta_content =
new
MetaContent
(
'1.0'
);
30
}
31
32
public
function
testAddMetaDatum
() : void
33
{
34
$key =
'key'
;
35
$value =
'value'
;
36
$this->meta_content->addMetaDatum($key, $value);
37
$collection = $this->meta_content->getMetaData();
38
39
$first_item = iterator_to_array($collection->getItems())[0];
40
$this->assertInstanceOf(MetaDatum::class, $first_item);
41
$this->assertEquals($key, $first_item->getKey());
42
$this->assertEquals($value, $first_item->getValue());
43
}
44
45
}
ILIAS\GlobalScreen\Scope\Layout\MetaDataTest
Class MetaDataTest.
Definition:
MetaDataTest.php:19
MetaDatum
ILIAS\GlobalScreen\Scope\Layout
MetaContent
ILIAS\GlobalScreen\Scope\Layout\MetaDataTest\setUp
setUp()
Definition:
MetaDataTest.php:26
Js
Css
ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaContent
Definition:
MetaContent.php:20
ILIAS\GlobalScreen\Scope\Layout\MetaDataTest\testAddMetaDatum
testAddMetaDatum()
Definition:
MetaDataTest.php:32
InlineCss
TestCase
ILIAS\GlobalScreen\Scope\Layout\MetaDataTest\$meta_content
$meta_content
Definition:
MetaDataTest.php:24
tests
GlobalScreen
Scope
Layout
MetaDataTest.php
Generated on Mon Apr 7 2025 20:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)