Class ilTestParticipantListTest.
More...
◆ setUp()
ilTestParticipantListTest::setUp |
( |
| ) |
|
|
protected |
◆ test_instantiateObject_shouldReturnInstance()
ilTestParticipantListTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
◆ testAddParticipant()
ilTestParticipantListTest::testAddParticipant |
( |
| ) |
|
Definition at line 49 of file ilTestParticipantListTest.php.
53 $participant->setActiveId($activeId);
54 $this->testObj->addParticipant($participant);
55 $this->assertEquals($participant, $this->testObj->getParticipantByActiveId($activeId));
◆ testCurrent()
ilTestParticipantListTest::testCurrent |
( |
| ) |
|
Definition at line 169 of file ilTestParticipantListTest.php.
References $id.
177 foreach ($ids as
$id) {
179 $participant->setUsrId($id);
180 $this->testObj->addParticipant($participant);
183 if (isset($ids[0])) {
184 $this->assertEquals($ids[0], $this->testObj->current()->getUsrId());
186 $this->assertTrue(
false);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testGetAccessFilteredList()
ilTestParticipantListTest::testGetAccessFilteredList |
( |
| ) |
|
Definition at line 138 of file ilTestParticipantListTest.php.
References $id.
154 foreach ($ids as
$id) {
156 $participant->setUsrId($id);
157 $this->testObj->addParticipant($participant);
160 $callback =
static function ($userIds) use ($expected) {
164 foreach ($expected as $value) {
165 $this->assertInstanceOf(ilTestParticipant::class, $this->testObj->getAccessFilteredList($callback)->getParticipantByUsrId($value));
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testGetAllActiveIds()
ilTestParticipantListTest::testGetAllActiveIds |
( |
| ) |
|
Definition at line 100 of file ilTestParticipantListTest.php.
References $id.
110 foreach ($ids as
$id) {
112 $participant->setActiveId($id);
113 $this->testObj->addParticipant($participant);
115 $this->assertEquals($ids, $this->testObj->getAllActiveIds());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testGetAllUserIds()
ilTestParticipantListTest::testGetAllUserIds |
( |
| ) |
|
Definition at line 82 of file ilTestParticipantListTest.php.
References $id.
92 foreach ($ids as
$id) {
94 $participant->setUsrId($id);
95 $this->testObj->addParticipant($participant);
97 $this->assertEquals($ids, $this->testObj->getAllUserIds());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testGetParticipantByUsrId()
ilTestParticipantListTest::testGetParticipantByUsrId |
( |
| ) |
|
Definition at line 58 of file ilTestParticipantListTest.php.
62 $participant->setUsrId($usr_id);
63 $this->testObj->addParticipant($participant);
64 $this->assertEquals($participant, $this->testObj->getParticipantByUsrId($usr_id));
◆ testHasUnfinishedPasses()
ilTestParticipantListTest::testHasUnfinishedPasses |
( |
| ) |
|
Definition at line 67 of file ilTestParticipantListTest.php.
70 $participant->setUnfinishedPasses(
false);
71 $this->testObj->addParticipant($participant);
73 $this->assertFalse($this->testObj->hasUnfinishedPasses());
76 $participant->setUnfinishedPasses(
true);
77 $this->testObj->addParticipant($participant);
79 $this->assertTrue($this->testObj->hasUnfinishedPasses());
◆ testIsActiveIdInList()
ilTestParticipantListTest::testIsActiveIdInList |
( |
| ) |
|
Definition at line 118 of file ilTestParticipantListTest.php.
References $id.
128 foreach ($ids as
$id) {
130 $participant->setActiveId($id);
131 $this->testObj->addParticipant($participant);
133 $this->assertTrue($this->testObj->isActiveIdInList($id));
135 $this->assertFalse($this->testObj->isActiveIdInList(PHP_INT_MAX));
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testKey()
ilTestParticipantListTest::testKey |
( |
| ) |
|
Definition at line 214 of file ilTestParticipantListTest.php.
References $id.
222 foreach ($ids as $key =>
$id) {
224 $participant->setUsrId(
$id);
225 $this->testObj->addParticipant($participant);
227 $this->assertEquals($key, $this->testObj->key());
228 $this->testObj->next();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testNext()
ilTestParticipantListTest::testNext |
( |
| ) |
|
Definition at line 190 of file ilTestParticipantListTest.php.
References $id.
198 foreach ($ids as
$id) {
200 $participant->setUsrId($id);
201 $this->testObj->addParticipant($participant);
204 $countIds = count($ids);
206 for ($i = 1; $i < $countIds; $i++) {
207 $this->testObj->next();
210 $this->assertEquals($ids[--$countIds], $this->testObj->current()->getUsrId());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testRewind()
ilTestParticipantListTest::testRewind |
( |
| ) |
|
Definition at line 255 of file ilTestParticipantListTest.php.
References $id.
263 foreach ($ids as
$id) {
265 $participant->setUsrId($id);
266 $this->testObj->addParticipant($participant);
269 $countIds = count($ids);
271 for ($i = 1; $i < $countIds; $i++) {
272 $this->testObj->next();
274 $this->assertTrue($this->testObj->valid());
276 $this->testObj->rewind();
277 $this->assertEquals($ids[0], $this->testObj->current()->getUsrId());
279 $this->assertTrue(
false);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ testValid()
ilTestParticipantListTest::testValid |
( |
| ) |
|
Definition at line 232 of file ilTestParticipantListTest.php.
References $id.
240 foreach ($ids as
$id) {
242 $participant->setUsrId($id);
243 $this->testObj->addParticipant($participant);
246 for ($i = 0, $iMax = count($ids) - 1; $i < $iMax; $i++) {
247 $this->testObj->next();
249 $this->assertTrue($this->testObj->valid());
251 $this->testObj->next();
252 $this->assertFalse($this->testObj->valid());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ $testObj
The documentation for this class was generated from the following file: