19 declare(strict_types=1);
30 protected function setUp(): void
32 $this->available = $this->createMock(LSLearnerItem::class);
33 $this->available->method(
'getAvailability')
34 ->willReturn(Step::AVAILABLE);
35 $this->unavailable = $this->createMock(LSLearnerItem::class);
36 $this->unavailable->method(
'getAvailability')
37 ->willReturn(Step::NOT_AVAILABLE);
39 $this->player =
new class () extends
ilLSPlayer {
43 public function _getNextAvailableItem(
47 return parent::getNextAvailableItem($items, $current_item);
60 $this->assertNotSame($items[0], $items[2]);
61 $this->assertEquals(Step::AVAILABLE, $items[1]->getAvailability());
62 $this->assertEquals(Step::NOT_AVAILABLE, $items[3]->getAvailability());
65 $next = $this->player->_getNextAvailableItem($items, $current);
66 $this->assertSame($current, $next);
78 $this->player->_getNextAvailableItem($items, $current)
94 array_search($this->player->_getNextAvailableItem($items, $current), $items)
107 $current = $items[1];
110 array_search($this->player->_getNextAvailableItem($items, $current), $items)
testLearningSequenceNextAvailableIsSame()
LSLearnerItem $unavailable
testLearningSequenceNextAvailableBackwards()
testLearningSequenceNextAvailableIsNull()
Implementation of KioskMode Player.
__construct(Container $dic, ilPlugin $plugin)
testLearningSequenceNextAvailableForwards()
Add learning progress and availability information to the LSItem.