ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestQuestionBrowserTableGUITest Class Reference

Class ilTestQuestionBrowserTableGUITest. More...

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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

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=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 
- Data Fields inherited from ilTestBaseTestCase
const string MOCKED_METHOD_WITHOUT_OUTPUT = 'MOCKED_METHOD_WITHOUT_OUTPUT'
 
const string DYNAMIC_CLASS = 'DynamicClass'
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 
Container $backup_dic = null
 
- Static Protected Attributes inherited from ilTestBaseTestCase
static int $DYNAMIC_CLASS_COUNT = 0
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestQuestionBrowserTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

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 }
@ilCtrl_Calls ilTestQuestionBrowserTableGUI: ilFormPropertyDispatchGUI
setGlobalVariable(string $name, mixed $value)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References addGlobal_ilSetting(), getTestObjMock(), and setGlobalVariable().

+ Here is the call graph for this function:

◆ 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: