19declare(strict_types=1);
30 protected function setUp(): void
34 $lng_mock = $this->createMock(ilLanguage::class);
35 $ctrl_mock = $this->createMock(ilCtrl::class);
36 $ctrl_mock->method(
"getFormAction")
37 ->willReturnCallback(
function () {
38 return "testFormAction";
44 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
45 $component_factory = $this->createMock(ilComponentFactory::class);
46 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
50 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods([
'getObject'])->getMock();
51 $this->parentObj_mock->method(
'getObject')->willReturn($this->
getTestObjMock());
54 $this->createMock(ilTestServiceGUI::class),
61 $this->assertInstanceOf(ilTestPassDetailsOverviewTableGUI::class, $this->tableGui);
66 $this->assertIsBool($this->tableGui->isPdfGenerationRequest());
67 $this->tableGui->setIsPdfGenerationRequest(
false);
68 $this->assertFalse($this->tableGui->isPdfGenerationRequest());
69 $this->tableGui->setIsPdfGenerationRequest(
true);
70 $this->assertTrue($this->tableGui->isPdfGenerationRequest());
75 $this->assertIsBool($this->tableGui->getAnswerListAnchorEnabled());
76 $this->tableGui->setAnswerListAnchorEnabled(
false);
77 $this->assertFalse($this->tableGui->getAnswerListAnchorEnabled());
78 $this->tableGui->setAnswerListAnchorEnabled(
true);
79 $this->assertTrue($this->tableGui->getAnswerListAnchorEnabled());
84 $this->assertIsBool($this->tableGui->getShowSuggestedSolution());
85 $this->tableGui->setShowSuggestedSolution(
false);
86 $this->assertFalse($this->tableGui->getShowSuggestedSolution());
87 $this->tableGui->setShowSuggestedSolution(
true);
88 $this->assertTrue($this->tableGui->getShowSuggestedSolution());
93 $this->tableGui->setActiveId(200);
94 $this->assertEquals(200, $this->tableGui->getActiveId());
99 $this->assertIsBool($this->tableGui->isObjectiveOrientedPresentationEnabled());
100 $this->tableGui->setObjectiveOrientedPresentationEnabled(
false);
101 $this->assertFalse($this->tableGui->isObjectiveOrientedPresentationEnabled());
102 $this->tableGui->setObjectiveOrientedPresentationEnabled(
true);
103 $this->assertTrue($this->tableGui->isObjectiveOrientedPresentationEnabled());
108 $this->assertIsBool($this->tableGui->areMultipleObjectivesInvolved());
109 $this->tableGui->setMultipleObjectivesInvolved(
false);
110 $this->assertFalse($this->tableGui->areMultipleObjectivesInvolved());
111 $this->tableGui->setMultipleObjectivesInvolved(
true);
112 $this->assertTrue($this->tableGui->areMultipleObjectivesInvolved());
117 $this->assertIsBool($this->tableGui->isPassColumnEnabled());
118 $this->tableGui->setPassColumnEnabled(
false);
119 $this->assertFalse($this->tableGui->isPassColumnEnabled());
120 $this->tableGui->setPassColumnEnabled(
true);
121 $this->assertTrue($this->tableGui->isPassColumnEnabled());
Class ilTestPassDetailsOverviewTableGUITest.
testMultipleObjectivesInvolved()
ilObjTestGUI $parentObj_mock
testAnswerListAnchorEnabled()
ilTestPassDetailsOverviewTableGUI $tableGui
testShowSuggestedSolution()
test_instantiateObject_shouldReturnInstance()
testPdfGenerationRequest()
testObjectiveOrientedPresentationEnabled()
setGlobalVariable(string $name, mixed $value)