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());
53 $this->parentObj_mock,
63 $this->assertInstanceOf(ilTestSkillLevelThresholdsTableGUI::class, $this->tableGui);
68 $this->assertIsBool($this->tableGui->areQuestionAssignmentColumnsEnabled());
69 $this->tableGui->setQuestionAssignmentColumnsEnabled(
false);
70 $this->assertFalse($this->tableGui->areQuestionAssignmentColumnsEnabled());
71 $this->tableGui->setQuestionAssignmentColumnsEnabled(
true);
72 $this->assertTrue($this->tableGui->areQuestionAssignmentColumnsEnabled());
Class ilTestSkillLevelThresholdsTableGUITest.
ilTestSkillLevelThresholdsTableGUI $tableGui
ilObjTestGUI $parentObj_mock
test_instantiateObject_shouldReturnInstance()
testQuestionAssignmentColumnsEnabled()
setGlobalVariable(string $name, mixed $value)