ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
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
ilSystemStyleMessageTest.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 2016 Tomasz Kolonko <thomas.kolonko@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
3
4
include_once(
"Services/Style/System/classes/Utilities/class.ilSystemStyleMessage.php"
);
5
6
use
PHPUnit\Framework\TestCase
;
7
13
class
ilSystemStyleMessageTest
extends
TestCase
14
{
15
19
protected
$ilSystemStyleMessage
;
20
24
protected
$messageString
=
"This is a message"
;
25
26
public
function
testConstructor
()
27
{
28
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
29
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_INFO
);
30
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessage
() ===
$this->messageString
);
31
32
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage($this->messageString,
ilSystemStyleMessage::TYPE_SUCCESS
);
33
$this->assertTrue($this->ilSystemStyleMessage->getTypeId() ===
ilSystemStyleMessage::TYPE_SUCCESS
);
34
$this->assertTrue($this->ilSystemStyleMessage->getMessage() ===
$this->messageString
);
35
36
$this->ilSystemStyleMessage =
new
ilSystemStyleMessage($this->messageString,
ilSystemStyleMessage::TYPE_ERROR
);
37
$this->assertTrue($this->ilSystemStyleMessage->getTypeId() ===
ilSystemStyleMessage::TYPE_ERROR
);
38
$this->assertTrue($this->ilSystemStyleMessage->getMessage() ===
$this->messageString
);
39
}
40
41
public
function
testGetAndSetMessage
()
42
{
43
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
44
$this->
ilSystemStyleMessage
->
setMessage
(
"This is an altered message"
);
45
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessage
() ===
"This is an altered message"
);
46
}
47
48
public
function
testGetAndSetTypeID
()
49
{
50
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
51
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_SUCCESS
);
52
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_SUCCESS
);
53
54
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_ERROR
);
55
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_ERROR
);
56
57
$this->
ilSystemStyleMessage
->
setTypeId
(
ilSystemStyleMessage::TYPE_INFO
);
58
$this->assertTrue($this->
ilSystemStyleMessage
->
getTypeId
() ===
ilSystemStyleMessage::TYPE_INFO
);
59
}
60
61
public
function
testGetMessageOutput
()
62
{
63
$this->
ilSystemStyleMessage
=
new
ilSystemStyleMessage
($this->messageString,
ilSystemStyleMessage::TYPE_INFO
);
64
$this->assertTrue($this->
ilSystemStyleMessage
->
getMessageOutput
() ===
"This is a message</br>"
);
65
}
66
}
ilSystemStyleMessageTest\testConstructor
testConstructor()
Definition:
ilSystemStyleMessageTest.php:26
ilSystemStyleMessageTest\testGetAndSetTypeID
testGetAndSetTypeID()
Definition:
ilSystemStyleMessageTest.php:48
ilSystemStyleMessage\getMessageOutput
getMessageOutput()
Definition:
class.ilSystemStyleMessage.php:39
ilSystemStyleMessageTest\$ilSystemStyleMessage
$ilSystemStyleMessage
Definition:
ilSystemStyleMessageTest.php:19
ilSystemStyleMessage
Message for the user.
Definition:
class.ilSystemStyleMessage.php:8
ilSystemStyleMessage\setMessage
setMessage($message)
Definition:
class.ilSystemStyleMessage.php:55
ilSystemStyleMessage\getTypeId
getTypeId()
Definition:
class.ilSystemStyleMessage.php:63
ilSystemStyleMessage\setTypeId
setTypeId($type_id)
Definition:
class.ilSystemStyleMessage.php:72
ilSystemStyleMessageTest\testGetAndSetMessage
testGetAndSetMessage()
Definition:
ilSystemStyleMessageTest.php:41
ilSystemStyleMessage\TYPE_ERROR
const TYPE_ERROR
Definition:
class.ilSystemStyleMessage.php:12
ilSystemStyleMessage\TYPE_INFO
const TYPE_INFO
Definition:
class.ilSystemStyleMessage.php:10
ilSystemStyleMessageTest\testGetMessageOutput
testGetMessageOutput()
Definition:
ilSystemStyleMessageTest.php:61
ilSystemStyleMessageTest
Definition:
ilSystemStyleMessageTest.php:13
ilSystemStyleMessage\getMessage
getMessage()
Definition:
class.ilSystemStyleMessage.php:47
TestCase
ilSystemStyleMessage\TYPE_SUCCESS
const TYPE_SUCCESS
Definition:
class.ilSystemStyleMessage.php:11
ilSystemStyleMessageTest\$messageString
$messageString
Definition:
ilSystemStyleMessageTest.php:24
Services
Style
System
test
ilSystemStyleMessageTest.php
Generated on Thu Apr 3 2025 21:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)