ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
◀ 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
LSLearnerItemTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
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
36
protected
ilLSPostCondition
$post_condition
;
37
38
protected
function
setUp
(): void
39
{
40
$this->post_condition =
new
ilLSPostCondition
(666,
'always'
);
41
}
42
43
public
function
testCreate
():
LSLearnerItem
44
{
45
$ls_item =
new
LSItem
(
46
self::TYPE,
47
self::TITLE,
48
self::DESC,
49
self::ICON_PATH,
50
self::IS_ONLINE,
51
self::ORDER_NUMBER,
52
$this->post_condition,
53
self::REF_ID
54
);
55
56
$object =
new
LSLearnerItem
(
57
self::USER_ID,
58
self::LP_STATUS,
59
self::AVAILABILITY_STATUS,
60
$ls_item
61
);
62
63
$this->assertEquals(self::USER_ID, $object->getUserId());
64
$this->assertEquals(self::LP_STATUS, $object->getLearningProgressStatus());
65
$this->assertEquals(self::AVAILABILITY_STATUS, $object->getAvailability());
66
67
return
$object;
68
}
69
73
public
function
testTurnedOffWithPostCondition
(
LSItem
$object): void
74
{
75
$this->expectException(LogicException::class);
76
$object->
withPostCondition
($this->post_condition);
77
}
78
82
public
function
testTurnedOffWithOrderNumber
(
LSItem
$object): void
83
{
84
$this->expectException(LogicException::class);
85
$object->
withOrderNumber
(self::ORDER_NUMBER);
86
}
87
91
public
function
testTurnedOffWithOnline
(
LSItem
$object): void
92
{
93
$this->expectException(LogicException::class);
94
$object->
withOnline
(self::IS_ONLINE);
95
}
96
}
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:73
LSItem\withOrderNumber
withOrderNumber(int $order_number)
Definition:
LSItem.php:102
LSLearnerItemTest\$post_condition
ilLSPostCondition $post_condition
Definition:
LSLearnerItemTest.php:36
LSLearnerItemTest\USER_ID
const USER_ID
Definition:
LSLearnerItemTest.php:32
LSItem
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
LSItem.php:24
LSLearnerItemTest\AVAILABILITY_STATUS
const AVAILABILITY_STATUS
Definition:
LSLearnerItemTest.php:34
LSLearnerItemTest\TYPE
const TYPE
Definition:
LSLearnerItemTest.php:25
LSItem\withPostCondition
withPostCondition(ilLSPostCondition $post_condition)
Definition:
LSItem.php:109
LSLearnerItemTest\DESC
const DESC
Definition:
LSLearnerItemTest.php:27
LSLearnerItemTest\testTurnedOffWithOrderNumber
testTurnedOffWithOrderNumber(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:82
LSLearnerItemTest\testTurnedOffWithOnline
testTurnedOffWithOnline(LSItem $object)
testCreate
Definition:
LSLearnerItemTest.php:91
ilLSPostCondition
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLSPostCondition.php:28
LSItem\withOnline
withOnline(bool $online)
Definition:
LSItem.php:95
LSLearnerItemTest\setUp
setUp()
Definition:
LSLearnerItemTest.php:38
LSLearnerItemTest\testCreate
testCreate()
Definition:
LSLearnerItemTest.php:43
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
LSLearnerItem
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
LSLearnerItem.php:24
Modules
LearningSequence
test
LearnerProgress
LSLearnerItemTest.php
Generated on Mon Apr 21 2025 22:01:28 for ILIAS by
1.8.13 (using
Doxyfile
)