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
LSLearnerItemTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
PHPUnit\Framework\TestCase
;
6
use
ILIAS\KioskMode\State
;
7
8
class
LSLearnerItemTest
extends
TestCase
9
{
10
const
TYPE
=
"type"
;
11
const
TITLE
=
"tile"
;
12
const
DESC
=
"description"
;
13
const
ICON_PATH
=
"icon_path"
;
14
const
IS_ONLINE
=
true
;
15
const
ORDER_NUMBER
= 10;
16
const
REF_ID
= 30;
17
const
USER_ID
= 6;
18
const
LP_STATUS
= 2;
19
const
AVAILABILITY_STATUS
= 3;
20
24
protected
$post_condition
;
25
26
public
function
setUp
() : void
27
{
28
$this->post_condition =
new
ilLSPostCondition
(666,
'always'
);
29
}
30
31
public
function
testCreate
() :
LSLearnerItem
32
{
33
$ls_item =
new
LSItem
(
34
self::TYPE,
35
self::TITLE,
36
self::DESC,
37
self::ICON_PATH,
38
self::IS_ONLINE,
39
self::ORDER_NUMBER,
40
$this->post_condition,
41
self::REF_ID
42
);
43
44
$object =
new
LSLearnerItem
(
45
self::USER_ID,
46
self::LP_STATUS,
47
self::AVAILABILITY_STATUS,
48
$ls_item
49
);
50
51
$this->assertEquals($object->getUserId(), self::USER_ID);
52
$this->assertEquals($object->getLearningProgressStatus(), self::LP_STATUS);
53
$this->assertEquals($object->getAvailability(), self::AVAILABILITY_STATUS);
54
55
return
$object;
56
}
57
61
public
function
testTurnedOffWithPostCondition
(
LSItem
$object)
62
{
63
$this->expectException(LogicException::class);
64
$object->
withPostCondition
($this->post_condition);
65
}
66
70
public
function
testTurnedOffWithOrderNumber
(
LSItem
$object)
71
{
72
$this->expectException(LogicException::class);
73
$object->
withOrderNumber
(self::ORDER_NUMBER);
74
}
75
79
public
function
testTurnedOffWithOnline
(
LSItem
$object)
80
{
81
$this->expectException(LogicException::class);
82
$object->
withOnline
(self::IS_ONLINE);
83
}
84
}
LSLearnerItemTest
Definition:
LSLearnerItemTest.php:8
State
LSLearnerItemTest\ORDER_NUMBER
const ORDER_NUMBER
Definition:
LSLearnerItemTest.php:15
LSLearnerItemTest\IS_ONLINE
const IS_ONLINE
Definition:
LSLearnerItemTest.php:14
LSLearnerItemTest\LP_STATUS
const LP_STATUS
Definition:
LSLearnerItemTest.php:18
LSLearnerItemTest\testTurnedOffWithPostCondition
testTurnedOffWithPostCondition(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:61
LSItem\withOrderNumber
withOrderNumber(int $order_number)
Definition:
LSItem.php:110
LSLearnerItemTest\USER_ID
const USER_ID
Definition:
LSLearnerItemTest.php:17
LSItem
Data holding class LSItem .
Definition:
LSItem.php:11
LSLearnerItemTest\AVAILABILITY_STATUS
const AVAILABILITY_STATUS
Definition:
LSLearnerItemTest.php:19
LSLearnerItemTest\TYPE
const TYPE
Definition:
LSLearnerItemTest.php:10
LSLearnerItemTest\DESC
const DESC
Definition:
LSLearnerItemTest.php:12
LSLearnerItemTest\testTurnedOffWithOrderNumber
testTurnedOffWithOrderNumber(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:70
LSLearnerItemTest\testTurnedOffWithOnline
testTurnedOffWithOnline(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:79
LSLearnerItemTest\$post_condition
$post_condition
Definition:
LSLearnerItemTest.php:24
ilLSPostCondition
A PostCondition does restrict the progression of a user through the learning sequence.
Definition:
class.ilLSPostCondition.php:14
LSItem\withPostCondition
withPostCondition(ilLSPostCondition $postcondition)
Definition:
LSItem.php:122
LSItem\withOnline
withOnline(bool $online)
Definition:
LSItem.php:98
LSLearnerItemTest\setUp
setUp()
Definition:
LSLearnerItemTest.php:26
LSLearnerItemTest\testCreate
testCreate()
Definition:
LSLearnerItemTest.php:31
LSLearnerItemTest\ICON_PATH
const ICON_PATH
Definition:
LSLearnerItemTest.php:13
LSLearnerItemTest\REF_ID
const REF_ID
Definition:
LSLearnerItemTest.php:16
TestCase
LSLearnerItemTest\TITLE
const TITLE
Definition:
LSLearnerItemTest.php:11
LSLearnerItem
Add learning progress and availability information to the LSItem.
Definition:
LSLearnerItem.php:11
Modules
LearningSequence
test
LearnerProgress
LSLearnerItemTest.php
Generated on Wed Apr 9 2025 21:01:11 for ILIAS by
1.8.13 (using
Doxyfile
)