ILIAS
trunk Revision v11.0_alpha-1753-gb21ca8c4367
◀ 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
ExamplesYamlParserTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\UI\Implementation\Crawler
as
Crawler
;
22
use
PHPUnit\Framework\TestCase
;
23
24
class
ExamplesYamlParserTest
extends
TestCase
25
{
26
protected
Crawler\EntriesYamlParser
$parser
;
27
28
protected
function
setUp
(): void
29
{
30
$this->parser =
new
class
() extends
Crawler
\ExamplesYamlParser {
31
public
function
_getYamlEntriesFromString(
string
$content): array
32
{
33
return
$this->getYamlEntriesFromString($content);
34
}
35
};
36
}
37
38
public
function
testProperEntry
(): void
39
{
40
$doc = <<<EOT
41
some other code here
42
54
function
something()
55
{
56
}
57
EOT;
58
$expected = [
59
'description'
=>
"\nExample showing..."
,
60
'expected output'
=>
"\nILIAS shows the expected output.\nAt least, it should."
61
];
62
63
$this->assertEquals(
64
$expected,
65
$this->parser->_getYamlEntriesFromString($doc)
66
);
67
68
}
69
70
public
function
testMissingBoundaries
(): void
71
{
72
$doc = <<<EOT
78
EOT;
79
$this->assertEquals([], $this->parser->_getYamlEntriesFromString($doc));
80
}
81
82
83
}
ExamplesYamlParserTest\testProperEntry
testProperEntry()
Definition:
ExamplesYamlParserTest.php:38
ExamplesYamlParserTest\testMissingBoundaries
testMissingBoundaries()
Definition:
ExamplesYamlParserTest.php:61
ExamplesYamlParserTest\setUp
setUp()
Definition:
ExamplesYamlParserTest.php:28
ExamplesYamlParserTest\$parser
Crawler EntriesYamlParser $parser
Definition:
ExamplesYamlParserTest.php:26
ILIAS\UI\Implementation\Crawler
Definition:
Crawler.php:21
ExamplesYamlParserTest
Definition:
ExamplesYamlParserTest.php:24
TestCase
TestCase
components
ILIAS
UI
tests
Crawler
ExamplesYamlParserTest.php
Generated on Thu Apr 10 2025 23:04:30 for ILIAS by
1.8.13 (using
Doxyfile
)