ILIAS
release_8 Revision v8.19
◀ 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
n
o
p
r
s
t
u
v
w
x
+
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
j
l
m
p
s
t
u
+
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
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
LinkTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
ILIAS\Data\Link
;
6
use
PHPUnit\Framework\TestCase
;
7
11
class
DataLinkTest
extends
TestCase
12
{
13
private \ILIAS\Data\Factory
$f
;
14
private
string
$label
;
15
private \ILIAS\Data\URI
$url
;
16
17
protected
function
setUp
(): void
18
{
19
$this->f =
new
ILIAS\Data\Factory
();
20
$this->label =
'ILIAS Homepage'
;
21
$this->url = $this->f->uri(
'https://www.ilias.de'
);
22
}
23
24
public
function
testFactory
():
Link
25
{
26
$link = $this->f->link($this->label, $this->url);
27
$this->assertInstanceOf(Link::class, $link);
28
return
$link;
29
}
30
34
public
function
testValues
(
Link
$link): void
35
{
36
$this->assertEquals(
37
$this->label,
38
$link->
getLabel
()
39
);
40
$this->assertEquals(
41
$this->url,
42
$link->getUrl()
43
);
44
}
45
}
DataLinkTest
Tests the Link Datatype.
Definition:
LinkTest.php:11
ILIAS\Data\Link
A Link is the often used combination of a label and an URL.
Definition:
Link.php:12
DataLinkTest\$url
ILIAS Data URI $url
Definition:
LinkTest.php:15
ILIAS\Data\Link
Factory
ILIAS\Data\Link\getLabel
getLabel()
Definition:
Link.php:23
DataLinkTest\testValues
testValues(Link $link)
testFactory
Definition:
LinkTest.php:34
DataLinkTest\testFactory
testFactory()
Definition:
LinkTest.php:24
DataLinkTest\$label
string $label
Definition:
LinkTest.php:14
DataLinkTest\$f
ILIAS Data Factory $f
Definition:
LinkTest.php:13
TestCase
DataLinkTest\setUp
setUp()
Definition:
LinkTest.php:17
tests
Data
LinkTest.php
Generated on Tue Apr 1 2025 22:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)