Definition at line 31 of file ilLearnerProgressDBTest.php.
◆ setUp()
| ilLearnerProgressDBTest::setUp |
( |
| ) |
|
|
protected |
◆ testCreateObject()
| ilLearnerProgressDBTest::testCreateObject |
( |
| ) |
|
◆ testGetLearnerItemsWithNonVisibleLSItem()
| ilLearnerProgressDBTest::testGetLearnerItemsWithNonVisibleLSItem |
( |
| ) |
|
Definition at line 67 of file ilLearnerProgressDBTest.php.
References ILIAS\Repository\access().
69 $ls_item = $this->createMock(LSItem::class);
72 ->expects($this->once())
77 ->expects($this->once())
83 ->expects($this->once())
84 ->method(
'checkAccessOfUser')
85 ->with(100,
'visible',
'', 33)
90 ->expects($this->once())
91 ->method(
'getLSItems')
93 ->willReturn([$ls_item])
97 $result = $obj->getLearnerItems(100, 44);
99 $this->assertIsArray($result);
100 $this->assertEmpty($result);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testGetLearnerItemsWithoutData()
| ilLearnerProgressDBTest::testGetLearnerItemsWithoutData |
( |
| ) |
|
Definition at line 51 of file ilLearnerProgressDBTest.php.
References ILIAS\Repository\access().
54 ->expects($this->once())
55 ->method(
'getLsItems')
61 $result = $obj->getLearnerItems(100, 33);
63 $this->assertIsArray($result);
64 $this->assertEmpty($result);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testGetLearnerItemsWithVisibleLSItem()
| ilLearnerProgressDBTest::testGetLearnerItemsWithVisibleLSItem |
( |
| ) |
|
Definition at line 103 of file ilLearnerProgressDBTest.php.
References ILIAS\Repository\access().
105 $ls_item = $this->createMock(LSItem::class);
108 ->expects($this->exactly(2))
113 ->expects($this->exactly(3))
119 ->expects($this->once())
123 ->expects($this->exactly(2))
124 ->method(
'checkAccessOfUser')
125 ->withConsecutive([100,
'visible',
'', 33], [100,
'read',
'', 33])
130 ->expects($this->once())
131 ->method(
'getLSItems')
133 ->willReturn([$ls_item])
137 $result = $obj->getLearnerItems(100, 44);
139 foreach ($result as $ls_learner_item) {
140 $this->assertInstanceOf(LSLearnerItem::class, $ls_learner_item);
141 $this->assertEquals(33, $ls_learner_item->getRefId());
142 $this->assertEquals(20, $ls_learner_item->getLearningProgressStatus());
143 $this->assertEquals(1, $ls_learner_item->getAvailability());
◆ $access
| ilAccess ilLearnerProgressDBTest::$access |
|
protected |
◆ $items_db
◆ $obj_data_cache
The documentation for this class was generated from the following file: