19 declare(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->expects($this->any())
37 ->method(
"getFormAction")
38 ->willReturnCallback(
function () {
39 return "testFormAction";
45 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
46 $component_factory = $this->createMock(ilComponentFactory::class);
47 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
51 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods([
'getObject'])->getMock();
52 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->
getTestObjMock());
55 $this->createMock(ilTestServiceGUI::class),
62 $this->assertInstanceOf(ilTestPassDetailsOverviewTableGUI::class, $this->tableGui);
67 $this->assertIsBool($this->tableGui->isPdfGenerationRequest());
68 $this->tableGui->setIsPdfGenerationRequest(
false);
69 $this->assertFalse($this->tableGui->isPdfGenerationRequest());
70 $this->tableGui->setIsPdfGenerationRequest(
true);
71 $this->assertTrue($this->tableGui->isPdfGenerationRequest());
76 $this->assertIsBool($this->tableGui->getAnswerListAnchorEnabled());
77 $this->tableGui->setAnswerListAnchorEnabled(
false);
78 $this->assertFalse($this->tableGui->getAnswerListAnchorEnabled());
79 $this->tableGui->setAnswerListAnchorEnabled(
true);
80 $this->assertTrue($this->tableGui->getAnswerListAnchorEnabled());
85 $this->assertIsBool($this->tableGui->getShowSuggestedSolution());
86 $this->tableGui->setShowSuggestedSolution(
false);
87 $this->assertFalse($this->tableGui->getShowSuggestedSolution());
88 $this->tableGui->setShowSuggestedSolution(
true);
89 $this->assertTrue($this->tableGui->getShowSuggestedSolution());
94 $this->tableGui->setActiveId(200);
95 $this->assertEquals(200, $this->tableGui->getActiveId());
100 $this->assertIsBool($this->tableGui->isObjectiveOrientedPresentationEnabled());
101 $this->tableGui->setObjectiveOrientedPresentationEnabled(
false);
102 $this->assertFalse($this->tableGui->isObjectiveOrientedPresentationEnabled());
103 $this->tableGui->setObjectiveOrientedPresentationEnabled(
true);
104 $this->assertTrue($this->tableGui->isObjectiveOrientedPresentationEnabled());
109 $this->assertIsBool($this->tableGui->areMultipleObjectivesInvolved());
110 $this->tableGui->setMultipleObjectivesInvolved(
false);
111 $this->assertFalse($this->tableGui->areMultipleObjectivesInvolved());
112 $this->tableGui->setMultipleObjectivesInvolved(
true);
113 $this->assertTrue($this->tableGui->areMultipleObjectivesInvolved());
118 $this->assertIsBool($this->tableGui->isPassColumnEnabled());
119 $this->tableGui->setPassColumnEnabled(
false);
120 $this->assertFalse($this->tableGui->isPassColumnEnabled());
121 $this->tableGui->setPassColumnEnabled(
true);
122 $this->assertTrue($this->tableGui->isPassColumnEnabled());
test_instantiateObject_shouldReturnInstance()
testPdfGenerationRequest()
Class ilTestPassDetailsOverviewTableGUITest.
testObjectiveOrientedPresentationEnabled()
testShowSuggestedSolution()
ilTestPassDetailsOverviewTableGUI $tableGui
testAnswerListAnchorEnabled()
setGlobalVariable(string $name, mixed $value)
ilObjTestGUI $parentObj_mock
testMultipleObjectivesInvolved()