19 declare(strict_types=1);
30 protected function setUp(): void
41 $ctrl_mock = $this->createMock(ilCtrl::class);
42 $ctrl_mock->expects($this->any())
43 ->method(
"getFormAction")
44 ->willReturnCallback(
function () {
45 return "testFormAction";
49 $component_factory = $this->createMock(ilComponentFactory::class);
50 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
53 $this->parentObj_mock = $this->createMock(ilParticipantsTestResultsGUI::class);
54 $objTest_mock = $this->createMock(ilObjTest::class);
57 ->expects($this->any())
58 ->method(
"getTestObj")
59 ->willReturn($objTest_mock);
66 $this->assertInstanceOf(ilParticipantsTestResultsTableGUI::class, $this->tableGui);
71 $this->assertIsBool($this->tableGui->isAccessResultsCommandsEnabled());
72 $this->tableGui->setAccessResultsCommandsEnabled(
true);
73 $this->assertTrue($this->tableGui->isAccessResultsCommandsEnabled());
75 $this->tableGui->setAccessResultsCommandsEnabled(
false);
76 $this->assertFalse($this->tableGui->isAccessResultsCommandsEnabled());
81 $this->assertIsBool($this->tableGui->isManageResultsCommandsEnabled());
82 $this->tableGui->setManageResultsCommandsEnabled(
true);
83 $this->assertTrue($this->tableGui->isManageResultsCommandsEnabled());
85 $this->tableGui->setManageResultsCommandsEnabled(
false);
86 $this->assertFalse($this->tableGui->isManageResultsCommandsEnabled());
91 $this->assertTrue($this->tableGui->numericOrdering(
"scored_pass"));
92 $this->assertTrue($this->tableGui->numericOrdering(
"answered_questions"));
93 $this->assertTrue($this->tableGui->numericOrdering(
"reached_points"));
94 $this->assertTrue($this->tableGui->numericOrdering(
"percent_result"));
95 $this->assertFalse($this->tableGui->numericOrdering(
"randomText"));
ilParticipantsTestResultsGUI: ilTestEvaluationGUI ilParticipantsTestResultsGUI: ilAssQuestionPageGUI...
testAccessResultsCommandsEnabled()
addGlobal_ilComponentRepository()
test_instantiateObject_shouldReturnInstance()
ilParticipantsTestResultsTableGUI $tableGui
setGlobalVariable(string $name, $value)
testManageResultsCommandsEnabled()
ilParticipantsTestResultsGUI $parentObj_mock
Class ilParticipantsTestResultsTableGUITest.