3 declare(strict_types=1);
30 protected function setUp(): void
38 $lng_mock = $this->createMock(ilLanguage::class);
39 $ctrl_mock = $this->createMock(ilCtrl::class);
40 $ctrl_mock->expects($this->any())
41 ->method(
"getFormAction")
42 ->willReturnCallback(
function () {
43 return "testFormAction";
49 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
50 $component_factory = $this->createMock(ilComponentFactory::class);
51 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
55 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array(
'getObject'))->getMock();
56 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->createMock(ilObjTest::class));
60 $this->parentObj_mock,
62 $this->createMock(ilAccess::class),
63 $this->createMock(
ILIAS\
UI\Factory::class),
64 $this->createMock(
ILIAS\
UI\Renderer::class),
72 $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI::class, $this->tableGui);
77 $this->assertIsBool($this->tableGui->isDefinitionEditModeEnabled());
78 $this->tableGui->setDefinitionEditModeEnabled(
false);
79 $this->assertFalse($this->tableGui->isDefinitionEditModeEnabled());
80 $this->tableGui->setDefinitionEditModeEnabled(
true);
81 $this->assertTrue($this->tableGui->isDefinitionEditModeEnabled());
86 $this->assertIsBool($this->tableGui->isQuestionAmountColumnEnabled());
87 $this->tableGui->setQuestionAmountColumnEnabled(
false);
88 $this->assertFalse($this->tableGui->isQuestionAmountColumnEnabled());
89 $this->tableGui->setQuestionAmountColumnEnabled(
true);
90 $this->assertTrue($this->tableGui->isQuestionAmountColumnEnabled());
ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI $tableGui
Class ChatMainBarProvider .
ilObjTestGUI $parentObj_mock
test_instantiateObject_shouldReturnInstance()
setGlobalVariable(string $name, $value)
testQuestionAmountColumnEnabled()
testDefinitionEditModeEnabled()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...