ILIAS  release_8 Revision v8.24
ilTestSequenceDynamicQuestionSetTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
28
29 protected function setUp(): void
30 {
31 parent::setUp();
32
33 $db_mock = $this->createMock(ilDBInterface::class);
34 $testDynamicQuestionSet_mock = $this->createMock(ilTestDynamicQuestionSet::class);
35
36 $this->testObj = new ilTestSequenceDynamicQuestionSet($db_mock, $testDynamicQuestionSet_mock, 17);
37 }
38
40 {
41 $this->assertInstanceOf(ilTestSequenceDynamicQuestionSet::class, $this->testObj);
42 }
43
44 public function testGetActiveId(): void
45 {
46 $this->assertEquals(17, $this->testObj->getActiveId());
47 }
48
50 {
51 $this->testObj->setPreventCheckedQuestionsFromComingUpEnabled(false);
52 $this->assertFalse($this->testObj->isPreventCheckedQuestionsFromComingUpEnabled());
53
54 $this->testObj->setPreventCheckedQuestionsFromComingUpEnabled(true);
55 $this->assertTrue($this->testObj->isPreventCheckedQuestionsFromComingUpEnabled());
56 }
57
58 public function testCurrentQuestionId(): void
59 {
60 $this->testObj->setCurrentQuestionId(5);
61 $this->assertEquals(5, $this->testObj->getCurrentQuestionId());
62 }
63}
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...