ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestEvaluationGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
28 
29  protected function setUp(): void
30  {
31  parent::setUp();
32 
33  $this->addGlobal_lng();
34  $this->addGlobal_tpl();
35  $this->addGlobal_ilToolbar();
36  $this->addGlobal_ilCtrl();
37  $this->addGlobal_ilias();
38  $this->addGlobal_ilUser();
41  $this->addGlobal_ilTabs();
42  $this->addGlobal_ilObjDataCache();
43  $this->addGlobal_http();
44  $this->addGlobal_ilErr();
46  $this->addGlobal_ilUser();
47  $this->addGlobal_ilHelp();
48  $this->addGlobal_ilLog();
49  $this->addGlobal_rbacsystem();
50  $this->addGlobal_ilAccess();
51  $this->addGlobal_ilSetting();
53  $this->addGlobal_uiFactory();
54  $this->addGlobal_uiRenderer();
55 
56  $this->testObj = new ilTestEvaluationGUI(
57  $this->getTestObjMock()
58  );
59  }
60 
62  {
63  $this->assertInstanceOf(ilTestEvaluationGUI::class, $this->testObj);
64  }
65 
66  public function testTestAccess(): void
67  {
68  $testAccess_mock = $this->createMock(ilTestAccess::class);
69 
70  $this->testObj->setTestAccess($testAccess_mock);
71 
72  $this->assertEquals($testAccess_mock, $this->testObj->getTestAccess());
73  }
74 
75  public function testGetEvaluationQuestionId(): void
76  {
77  $this->assertEquals(20, $this->testObj->getEvaluationQuestionId(20, 0));
78  $this->assertEquals(20, $this->testObj->getEvaluationQuestionId(20, -210));
79  $this->assertEquals(125, $this->testObj->getEvaluationQuestionId(20, 125));
80  }
81 }
Class ilTestEvaluationGUITest.
Output class for assessment test evaluation.
Class ilTestBaseClass.