19 declare(strict_types=1);
30 protected function setUp(): void
34 $this->addGlobal_ilSetting();
36 $lng_mock = $this->createMock(ilLanguage::class);
39 ->willReturnCallback(
function () {
40 return "testTranslation";
43 $ctrl_mock = $this->createMock(ilCtrl::class);
45 ->method(
"getFormAction")
46 ->willReturnCallback(
function () {
47 return "testFormAction";
50 $mainTpl_mock = $this->createMock(ilGlobalPageTemplate::class);
51 $db_mock = $this->createMock(ilDBInterface::class);
52 $tree_mock = $this->createMock(ilTree::class);
53 $this->setGlobalVariable(
"lng", $lng_mock);
54 $this->setGlobalVariable(
"ilCtrl", $ctrl_mock);
55 $this->setGlobalVariable(
"tpl", $mainTpl_mock);
56 $this->setGlobalVariable(
"tree", $tree_mock);
57 $this->setGlobalVariable(
"ilDB", $db_mock);
58 $this->setGlobalVariable(
"ilObjDataCache", $this->createMock(ilObjectDataCache::class));
60 $component_factory = $this->createMock(ilComponentFactory::class);
61 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
62 $this->setGlobalVariable(
"component.factory", $component_factory);
64 $component_repository = $this->createMock(ilComponentRepository::class);
65 $this->setGlobalVariable(
"component.repository", $component_repository);
67 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods([
'getObject'])->getMock();
68 $this->parentObj_mock->method(
'getObject')->willReturn($this->getTestObjMock());
70 $this->getMockBuilder(ilTabsGUI::class)->disableOriginalConstructor()->getMock(),
73 $this->createMock(
ILIAS\
Test\Logging\TestLogger::class),
74 $component_repository,
75 $this->getMockBuilder(ilObjTest::class)->disableOriginalConstructor()->getMock(),
76 $this->createMock(ilObjUser::class),
77 $this->createMock(ilAccessHandler::class),
78 $this->createMock(\
ILIAS\
HTTP\GlobalHttpState::class),
81 $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
83 $this->createMock(
ILIAS\
UI\Factory::class),
84 $this->createMock(
ILIAS\
UI\Renderer::class),
85 $this->createMock(
ILIAS\
Test\RequestDataCollector::class),
86 $this->createMock(
ILIAS\TestQuestionPool\Questions\GeneralQuestionPropertiesRepository::class),
90 $this->createMock(ilUIService::class),
91 $this->createMock(
ILIAS\
Data\Factory::class),
92 $this->createMock(
ILIAS\Taxonomy\DomainService::class),
93 fn(
int $questionPoolId) =>
'testLink' 99 $this->assertInstanceOf(ilTestQuestionBrowserTableGUI::class, $this->tableGui);
Interface Observer Contains several chained tasks and infos about them.
ilObjTestGUI $parentObj_mock
test_instantiateObject_shouldReturnInstance()
ilTestQuestionBrowserTableGUI $tableGui
Class ilTestQuestionBrowserTableGUITest.