ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ 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
LSLearnerItemTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
PHPUnit\Framework\TestCase
;
22
23
class
LSLearnerItemTest
extends
TestCase
24
{
25
public
const
TYPE
=
"type"
;
26
public
const
TITLE
=
"tile"
;
27
public
const
DESC
=
"description"
;
28
public
const
ICON_PATH
=
"icon_path"
;
29
public
const
IS_ONLINE
=
true
;
30
public
const
ORDER_NUMBER
= 10;
31
public
const
REF_ID
= 30;
32
public
const
USER_ID
= 6;
33
public
const
LP_STATUS
= 2;
34
public
const
AVAILABILITY_STATUS
= 3;
35
public
const
LP_MODE
= 3;
36
37
protected
ilLSPostCondition
$post_condition
;
38
39
protected
function
setUp
(): void
40
{
41
$this->post_condition =
new
ilLSPostCondition
(666,
'always'
);
42
}
43
44
public
function
testCreate
():
LSLearnerItem
45
{
46
$ls_item =
new
LSItem
(
47
self::TYPE,
48
self::TITLE,
49
self::DESC,
50
self::ICON_PATH,
51
self::IS_ONLINE,
52
self::ORDER_NUMBER,
53
$this->post_condition,
54
self::REF_ID,
55
self::LP_MODE
56
);
57
58
$object =
new
LSLearnerItem
(
59
self::USER_ID,
60
self::LP_STATUS,
61
self::AVAILABILITY_STATUS,
62
$ls_item
63
);
64
65
$this->assertEquals(self::USER_ID, $object->getUserId());
66
$this->assertEquals(self::LP_STATUS, $object->getLearningProgressStatus());
67
$this->assertEquals(self::AVAILABILITY_STATUS, $object->getAvailability());
68
69
return
$object;
70
}
71
75
public
function
testTurnedOffWithPostCondition
(
LSItem
$object): void
76
{
77
$this->expectException(LogicException::class);
78
$object->
withPostCondition
($this->post_condition);
79
}
80
84
public
function
testTurnedOffWithOrderNumber
(
LSItem
$object): void
85
{
86
$this->expectException(LogicException::class);
87
$object->
withOrderNumber
(self::ORDER_NUMBER);
88
}
89
93
public
function
testTurnedOffWithOnline
(
LSItem
$object): void
94
{
95
$this->expectException(LogicException::class);
96
$object->
withOnline
(self::IS_ONLINE);
97
}
98
}
LSLearnerItemTest
Definition:
LSLearnerItemTest.php:23
LSLearnerItemTest\ORDER_NUMBER
const ORDER_NUMBER
Definition:
LSLearnerItemTest.php:30
LSLearnerItemTest\IS_ONLINE
const IS_ONLINE
Definition:
LSLearnerItemTest.php:29
LSLearnerItemTest\LP_STATUS
const LP_STATUS
Definition:
LSLearnerItemTest.php:33
LSLearnerItemTest\testTurnedOffWithPostCondition
testTurnedOffWithPostCondition(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:75
LSItem\withOrderNumber
withOrderNumber(int $order_number)
Definition:
LSItem.php:110
LSLearnerItemTest\$post_condition
ilLSPostCondition $post_condition
Definition:
LSLearnerItemTest.php:37
LSLearnerItemTest\USER_ID
const USER_ID
Definition:
LSLearnerItemTest.php:32
LSItem
Data holding class LSItem .
Definition:
LSItem.php:24
LSLearnerItemTest\AVAILABILITY_STATUS
const AVAILABILITY_STATUS
Definition:
LSLearnerItemTest.php:34
LSLearnerItemTest\LP_MODE
const LP_MODE
Definition:
LSLearnerItemTest.php:35
LSLearnerItemTest\TYPE
const TYPE
Definition:
LSLearnerItemTest.php:25
LSItem\withPostCondition
withPostCondition(ilLSPostCondition $post_condition)
Definition:
LSItem.php:117
LSLearnerItemTest\DESC
const DESC
Definition:
LSLearnerItemTest.php:27
LSLearnerItemTest\testTurnedOffWithOrderNumber
testTurnedOffWithOrderNumber(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:84
LSLearnerItemTest\testTurnedOffWithOnline
testTurnedOffWithOnline(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:93
ilLSPostCondition
A PostCondition does restrict the progression of a user through the learning sequence.
Definition:
class.ilLSPostCondition.php:28
LSItem\withOnline
withOnline(bool $online)
Definition:
LSItem.php:103
LSLearnerItemTest\setUp
setUp()
Definition:
LSLearnerItemTest.php:39
LSLearnerItemTest\testCreate
testCreate()
Definition:
LSLearnerItemTest.php:44
LSLearnerItemTest\ICON_PATH
const ICON_PATH
Definition:
LSLearnerItemTest.php:28
LSLearnerItemTest\REF_ID
const REF_ID
Definition:
LSLearnerItemTest.php:31
TestCase
LSLearnerItemTest\TITLE
const TITLE
Definition:
LSLearnerItemTest.php:26
TestCase
LSLearnerItem
Add learning progress and availability information to the LSItem.
Definition:
LSLearnerItem.php:24
components
ILIAS
LearningSequence
tests
LearnerProgress
LSLearnerItemTest.php
Generated on Sat Apr 5 2025 23:03:28 for ILIAS by
1.8.13 (using
Doxyfile
)