ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestQuestionBrowserTableGUITest Class Reference

Class ilTestQuestionBrowserTableGUITest. More...

+ Inheritance diagram for ilTestQuestionBrowserTableGUITest:
+ Collaboration diagram for ilTestQuestionBrowserTableGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 

Private Attributes

ilTestQuestionBrowserTableGUI $tableGui
 
ilObjTestGUI $parentObj_mock
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestQuestionBrowserTableGUITest::setUp ( )
protected

Definition at line 30 of file ilTestQuestionBrowserTableGUITest.php.

30  : void
31  {
32  parent::setUp();
33 
34  $this->addGlobal_ilSetting();
35 
36  $lng_mock = $this->createMock(ilLanguage::class);
37  $lng_mock
38  ->method("txt")
39  ->willReturnCallback(function () {
40  return "testTranslation";
41  });
42 
43  $ctrl_mock = $this->createMock(ilCtrl::class);
44  $ctrl_mock
45  ->method("getFormAction")
46  ->willReturnCallback(function () {
47  return "testFormAction";
48  });
49 
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));
59 
60  $component_factory = $this->createMock(ilComponentFactory::class);
61  $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
62  $this->setGlobalVariable("component.factory", $component_factory);
63 
64  $component_repository = $this->createMock(ilComponentRepository::class);
65  $this->setGlobalVariable("component.repository", $component_repository);
66 
67  $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(['getObject'])->getMock();
68  $this->parentObj_mock->method('getObject')->willReturn($this->getTestObjMock());
69  $this->tableGui = new ilTestQuestionBrowserTableGUI(
70  $this->getMockBuilder(ilTabsGUI::class)->disableOriginalConstructor()->getMock(),
71  $tree_mock,
72  $db_mock,
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),
79  new \ILIAS\Refinery\Factory(
80  new \ILIAS\Data\Factory(),
81  $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
82  ),
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),
87  $lng_mock,
88  $ctrl_mock,
89  $mainTpl_mock,
90  $this->createMock(ilUIService::class),
91  $this->createMock(ILIAS\Data\Factory::class),
92  $this->createMock(ILIAS\Taxonomy\DomainService::class),
93  fn(int $questionPoolId) => 'testLink'
94  );
95  }
Interface Observer Contains several chained tasks and infos about them.

◆ test_instantiateObject_shouldReturnInstance()

ilTestQuestionBrowserTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 97 of file ilTestQuestionBrowserTableGUITest.php.

97  : void
98  {
99  $this->assertInstanceOf(ilTestQuestionBrowserTableGUI::class, $this->tableGui);
100  }

Field Documentation

◆ $parentObj_mock

ilObjTestGUI ilTestQuestionBrowserTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilTestQuestionBrowserTableGUITest.php.

◆ $tableGui

ilTestQuestionBrowserTableGUI ilTestQuestionBrowserTableGUITest::$tableGui
private

Definition at line 27 of file ilTestQuestionBrowserTableGUITest.php.


The documentation for this class was generated from the following file: