ILIAS
trunk Revision v11.0_alpha-1689-g66c127b4ae8
◀ 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
ilSystemStyleMessageTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
require_once(
'vendor/composer/vendor/autoload.php'
);
22
23
use
PHPUnit\Framework\TestCase
;
24
25
class
ilSystemStyleMessageTest
extends
TestCase
26
{
27
protected
ilSystemStyleMessage
$ilSystemStyleMessage
;
28
protected
string
$messageString
=
'This is a message'
;
29
30
public
function
testConstructor
(): void
31
{
32
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
33
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_INFO
);
34
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessage
() ===
$this->messageString
);
35
36
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage($this->messageString,
ilSystemStyleMessage::TYPE_SUCCESS
);
37
$this->assertTrue($this->ilSystemStyleMessage->getTypeId() ===
ilSystemStyleMessage::TYPE_SUCCESS
);
38
$this->assertTrue($this->ilSystemStyleMessage->getMessage() ===
$this->messageString
);
39
40
$this->ilSystemStyleMessage =
new
ilSystemStyleMessage($this->messageString,
ilSystemStyleMessage::TYPE_ERROR
);
41
$this->assertTrue($this->ilSystemStyleMessage->getTypeId() ===
ilSystemStyleMessage::TYPE_ERROR
);
42
$this->assertTrue($this->ilSystemStyleMessage->getMessage() ===
$this->messageString
);
43
}
44
45
public
function
testGetAndSetMessage
(): void
46
{
47
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
48
$this->
ilSystemStyleMessage
->
setMessage
(
'This is an altered message'
);
49
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessage
() ===
'This is an altered message'
);
50
}
51
52
public
function
testGetAndSetTypeID
(): void
53
{
54
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
55
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_SUCCESS
);
56
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_SUCCESS
);
57
58
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_ERROR
);
59
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_ERROR
);
60
61
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_INFO
);
62
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_INFO
);
63
}
64
65
public
function
testGetMessageOutput
(): void
66
{
67
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
68
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessageOutput
() ===
'This is a message</br>'
);
69
}
70
}
ilSystemStyleMessageTest\testConstructor
testConstructor()
Definition:
ilSystemStyleMessageTest.php:30
ilSystemStyleMessageTest\testGetAndSetTypeID
testGetAndSetTypeID()
Definition:
ilSystemStyleMessageTest.php:52
ilSystemStyleMessage\getMessageOutput
getMessageOutput()
Definition:
class.ilSystemStyleMessage.php:39
ilSystemStyleMessage
Message for the user.
Definition:
class.ilSystemStyleMessage.php:24
ilSystemStyleMessage\setMessage
setMessage(string $message)
Definition:
class.ilSystemStyleMessage.php:49
ilSystemStyleMessage\getTypeId
getTypeId()
Definition:
class.ilSystemStyleMessage.php:54
ilSystemStyleMessageTest\testGetAndSetMessage
testGetAndSetMessage()
Definition:
ilSystemStyleMessageTest.php:45
ilSystemStyleMessageTest\$ilSystemStyleMessage
ilSystemStyleMessage $ilSystemStyleMessage
Definition:
ilSystemStyleMessageTest.php:27
ilSystemStyleMessageTest\$messageString
string $messageString
Definition:
ilSystemStyleMessageTest.php:28
ilSystemStyleMessage\TYPE_ERROR
const TYPE_ERROR
Definition:
class.ilSystemStyleMessage.php:28
ilSystemStyleMessage\TYPE_INFO
const TYPE_INFO
Definition:
class.ilSystemStyleMessage.php:26
ilSystemStyleMessageTest\testGetMessageOutput
testGetMessageOutput()
Definition:
ilSystemStyleMessageTest.php:65
ilSystemStyleMessageTest
Definition:
ilSystemStyleMessageTest.php:25
ilSystemStyleMessage\getMessage
getMessage()
Definition:
class.ilSystemStyleMessage.php:44
TestCase
ilSystemStyleMessage\setTypeId
setTypeId(int $type_id)
Definition:
class.ilSystemStyleMessage.php:62
ilSystemStyleMessage\TYPE_SUCCESS
const TYPE_SUCCESS
Definition:
class.ilSystemStyleMessage.php:27
TestCase
components
ILIAS
Style
System
test
Utilities
ilSystemStyleMessageTest.php
Generated on Wed Apr 2 2025 23:03:42 for ILIAS by
1.8.13 (using
Doxyfile
)