ILIAS  release_8 Revision v8.24
ilTestBaseTestCase Class Reference

Class ilTestBaseClass. More...

+ Inheritance diagram for ilTestBaseTestCase:
+ Collaboration diagram for ilTestBaseTestCase:

Protected Member Functions

 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Protected Attributes

Container $dic = null
 

Detailed Description

Class ilTestBaseClass.

Author
Marvin Beym mbeym.nosp@m.@dat.nosp@m.abay..nosp@m.de

Definition at line 35 of file ilTestBaseTestCase.php.

Member Function Documentation

◆ addGlobal_filesystem()

ilTestBaseTestCase::addGlobal_filesystem ( )
protected

Definition at line 180 of file ilTestBaseTestCase.php.

180 : void
181 {
182 $this->setGlobalVariable("filesystem", $this->createMock(Filesystems::class));
183 }
setGlobalVariable(string $name, $value)

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_http()

ilTestBaseTestCase::addGlobal_http ( )
protected

Definition at line 250 of file ilTestBaseTestCase.php.

250 : void
251 {
252 $this->setGlobalVariable("http", $this->createMock(Services::class));
253 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp(), ilParticipantsTestResultsGUITest\setUp(), and ilTestCorrectionsGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilAccess()

ilTestBaseTestCase::addGlobal_ilAccess ( )
protected

Definition at line 140 of file ilTestBaseTestCase.php.

140 : void
141 {
142 $this->setGlobalVariable("ilAccess", $this->createMock(ilAccess::class));
143 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp(), ilTestAccessTest\setUp(), ilTestCorrectionsGUITest\setUp(), ilTestTabsManagerTest\setUp(), ilTestQuestionsTableGUITest\setUp(), and ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilAppEventHandler()

ilTestBaseTestCase::addGlobal_ilAppEventHandler ( )
protected

Definition at line 210 of file ilTestBaseTestCase.php.

210 : void
211 {
212 $this->setGlobalVariable("ilAppEventHandler", $this->createMock(ilAppEventHandler::class));
213 }

References setGlobalVariable().

Referenced by ilObjAssessmentFolderTest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilObjTestTest\setUp(), ilObjTestVerificationTest\setUp(), setUp(), ilTestTaxonomyTreeTest\setUp(), ilTestExportFactoryTest\testGetExporter(), and ilTestPlayerFactoryTest\testGetPlayerGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilComponentRepository()

ilTestBaseTestCase::addGlobal_ilComponentRepository ( )
protected

◆ addGlobal_ilCtrl()

◆ addGlobal_ilDB()

ilTestBaseTestCase::addGlobal_ilDB ( )
protected

Definition at line 190 of file ilTestBaseTestCase.php.

190 : void
191 {
192 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
193 }

References setGlobalVariable().

Referenced by ilCronFinishUnfinishedTestPassesTest\setUp(), ilObjAssessmentFolderTest\setUp(), ilObjTestGUITest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilObjTestTest\setUp(), ilObjTestVerificationTest\setUp(), ilParticipantsTestResultsGUITest\setUp(), setUp(), ilTestCorrectionsGUITest\setUp(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestEvaluationGUITest\setUp(), ilTestExportDynamicQuestionSetTest\setUp(), ilTestExportFixedQuestionSetTest\setUp(), ilTestExportRandomQuestionSetTest\setUp(), ilTestPlayerFixedQuestionSetGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestScoringByQuestionsGUITest\setUp(), ilTestScoringGUITest\setUp(), ilTestServiceGUITest\setUp(), ilTestSubmissionReviewGUITest\setUp(), ilTestTaxonomyFilterLabelTranslaterTest\setUp(), ilTestToplistGUITest\setUp(), ilTestTopListTest\setUp(), ilObjTestDynamicQuestionSetConfigTest\testAreDepenciesBroken(), ilObjTestDynamicQuestionSetConfigTest\testGetDepenciesBrokenMessage(), ilObjTestDynamicQuestionSetConfigTest\testGetDepenciesInVulnerableStateMessage(), ilTestExportFactoryTest\testGetExporter(), ilTestPlayerFactoryTest\testGetPlayerGUI(), ilObjTestDynamicQuestionSetConfigTest\testGetSourceQuestionPoolSummaryString(), and ilTestSkillLevelThresholdXmlParserTest\testInitSkillLevelThresholdImportList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilErr()

ilTestBaseTestCase::addGlobal_ilErr ( )
protected

◆ addGlobal_ilHelp()

ilTestBaseTestCase::addGlobal_ilHelp ( )
protected

Definition at line 265 of file ilTestBaseTestCase.php.

265 : void
266 {
267 $this->setGlobalVariable("ilHelp", $this->createMock(ilHelpGUI::class));
268 }

References setGlobalVariable().

Referenced by ilTestCorrectionsGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilias()

◆ addGlobal_ilIliasIniFile()

ilTestBaseTestCase::addGlobal_ilIliasIniFile ( )
protected

Definition at line 255 of file ilTestBaseTestCase.php.

255 : void
256 {
257 $this->setGlobalVariable("ilIliasIniFile", $this->createMock(ilIniFile::class));
258 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilLocator()

ilTestBaseTestCase::addGlobal_ilLocator ( )
protected

Definition at line 235 of file ilTestBaseTestCase.php.

235 : void
236 {
237 $this->setGlobalVariable("ilLocator", $this->createMock(ilLocatorGUI::class));
238 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilLog()

ilTestBaseTestCase::addGlobal_ilLog ( )
protected

Definition at line 195 of file ilTestBaseTestCase.php.

195 : void
196 {
197 $this->setGlobalVariable("ilLog", $this->createMock(ilLogger::class));
198 }

References setGlobalVariable().

Referenced by ilObjAssessmentFolderTest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilObjTestTest\setUp(), ilObjTestVerificationTest\setUp(), setUp(), ilTestExportFactoryTest\testGetExporter(), and ilTestPlayerFactoryTest\testGetPlayerGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilLoggerFactory()

ilTestBaseTestCase::addGlobal_ilLoggerFactory ( )
protected

Definition at line 260 of file ilTestBaseTestCase.php.

260 : void
261 {
262 $this->setGlobalVariable("ilLoggerFactory", $this->createMock(ilLoggerFactory::class));
263 }

References setGlobalVariable().

Referenced by ilParticipantsTestResultsGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilObjDataCache()

ilTestBaseTestCase::addGlobal_ilObjDataCache ( )
protected

◆ addGlobal_ilSetting()

ilTestBaseTestCase::addGlobal_ilSetting ( )
protected

Definition at line 160 of file ilTestBaseTestCase.php.

160 : void
161 {
162 $this->setGlobalVariable("ilSetting", $this->createMock(ilSetting::class));
163 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilTabs()

◆ addGlobal_ilToolbar()

ilTestBaseTestCase::addGlobal_ilToolbar ( )
protected

Definition at line 245 of file ilTestBaseTestCase.php.

245 : void
246 {
247 $this->setGlobalVariable("ilToolbar", $this->createMock(ilToolbarGUI::class));
248 }

References setGlobalVariable().

Referenced by ilMarkSchemaGUITest\setUp(), ilObjTestGUITest\setUp(), and ilParticipantsTestResultsGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilUser()

ilTestBaseTestCase::addGlobal_ilUser ( )
protected

◆ addGlobal_lng()

◆ addGlobal_objDefinition()

ilTestBaseTestCase::addGlobal_objDefinition ( )
protected

Definition at line 150 of file ilTestBaseTestCase.php.

150 : void
151 {
152 $this->setGlobalVariable("objDefinition", $this->createMock(ilObjectDefinition::class));
153 }

References setGlobalVariable().

Referenced by ilObjAssessmentFolderTest\setUp(), ilObjTestGUITest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilObjTestTest\setUp(), ilObjTestVerificationTest\setUp(), setUp(), ilTestRandomQuestionSetConfigGUITest\setUp(), ilTestExportFactoryTest\testGetExporter(), and ilTestPlayerFactoryTest\testGetPlayerGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_rbacreview()

ilTestBaseTestCase::addGlobal_rbacreview ( )
protected

Definition at line 240 of file ilTestBaseTestCase.php.

240 : void
241 {
242 $this->setGlobalVariable("rbacreview", $this->createMock(ilRbacReview::class));
243 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_rbacsystem()

ilTestBaseTestCase::addGlobal_rbacsystem ( )
protected

Definition at line 165 of file ilTestBaseTestCase.php.

165 : void
166 {
167 $this->setGlobalVariable("rbacsystem", $this->createMock(ilRbacSystem::class));
168 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp(), ilTestPlayerFixedQuestionSetGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), and ilTestPlayerFactoryTest\testGetPlayerGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_refinery()

ilTestBaseTestCase::addGlobal_refinery ( )
protected

Definition at line 285 of file ilTestBaseTestCase.php.

285 : void
286 {
287 $refineryMock = $this->getMockBuilder(RefineryFactory::class)->disableOriginalConstructor()->getMock();
288 $refineryMock->expects(self::any())->method('random')->willReturn($this->getMockBuilder(RandomGroup::class)->getMock());
289 $this->setGlobalVariable("refinery", $refineryMock);
290 }

References setGlobalVariable().

Referenced by ilParticipantsTestResultsGUITest\setUp(), setUp(), ilTestCorrectionsGUITest\setUp(), ilTestPlayerFixedQuestionSetGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), and ilTestPlayerFactoryTest\testGetPlayerGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_tpl()

◆ addGlobal_tree()

◆ addGlobal_ui()

ilTestBaseTestCase::addGlobal_ui ( )
protected

Definition at line 270 of file ilTestBaseTestCase.php.

270 : void
271 {
272 $this->setGlobalVariable("ui", $this->createMock(ILIAS\DI\UIServices::class));
273 }
Class HTTPServicesTest.
Class ChatMainBarProvider \MainMenu\Provider.

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_uiFactory()

ilTestBaseTestCase::addGlobal_uiFactory ( )
protected

Definition at line 275 of file ilTestBaseTestCase.php.

275 : void
276 {
277 $this->setGlobalVariable("ui.factory", $this->createMock(Factory::class));
278 }

References setGlobalVariable().

Referenced by ilMarkSchemaGUITest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilTestToplistGUITest\setUp(), and ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_uiRenderer()

ilTestBaseTestCase::addGlobal_uiRenderer ( )
protected

Definition at line 280 of file ilTestBaseTestCase.php.

280 : void
281 {
282 $this->setGlobalVariable("ui.renderer", $this->createMock(ILIAS\UI\Implementation\DefaultRenderer::class));
283 }
Class Factory.

References setGlobalVariable().

Referenced by ilMarkSchemaGUITest\setUp(), ilObjTestSettingsGeneralGUITest\setUp(), ilTestToplistGUITest\setUp(), and ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_upload()

ilTestBaseTestCase::addGlobal_upload ( )
protected

Definition at line 185 of file ilTestBaseTestCase.php.

185 : void
186 {
187 $this->setGlobalVariable("upload", $this->createMock(FileUpload::class));
188 }

References setGlobalVariable().

Referenced by ilObjTestGUITest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDatabaseMock()

ilTestBaseTestCase::getDatabaseMock ( )
protected
Returns
ilDBInterface|mixed|MockObject

Definition at line 119 of file ilTestBaseTestCase.php.

120 {
121 return $this->getMockBuilder(ilDBInterface::class)->disableOriginalConstructor()->getMock();
122 }

◆ getGlobalTemplateMock()

ilTestBaseTestCase::getGlobalTemplateMock ( )
protected
Returns
ilTemplate|mixed|MockObject

Definition at line 111 of file ilTestBaseTestCase.php.

112 {
113 return $this->getMockBuilder(ilTemplate::class)->disableOriginalConstructor()->getMock();
114 }

◆ getIliasMock()

ilTestBaseTestCase::getIliasMock ( )
protected
Returns
ILIAS|mixed|MockObject

Definition at line 127 of file ilTestBaseTestCase.php.

128 {
129 $mock = $this->getMockBuilder(ILIAS::class)->disableOriginalConstructor()->getMock();
130
131 $account = new stdClass();
132 $account->id = 6;
133 $account->fullname = 'Esther Tester';
134
135 $mock->account = $account;
136
137 return $mock;
138 }

Referenced by addGlobal_ilias(), and ilTestSkillAdministrationGUITest\setUp().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilTestBaseTestCase::setGlobalVariable ( string  $name,
  $value 
)
protected
Parameters
string$name
mixed$value

Definition at line 96 of file ilTestBaseTestCase.php.

96 : void
97 {
98 global $DIC;
99
100 $GLOBALS[$name] = $value;
101
102 unset($DIC[$name]);
103 $DIC[$name] = static function (Container $c) use ($value) {
104 return $value;
105 };
106 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

References $c, $DIC, $GLOBALS, and $name.

Referenced by addGlobal_filesystem(), addGlobal_http(), addGlobal_ilAccess(), addGlobal_ilAppEventHandler(), addGlobal_ilComponentRepository(), addGlobal_ilCtrl(), addGlobal_ilDB(), addGlobal_ilErr(), addGlobal_ilHelp(), addGlobal_ilias(), addGlobal_ilIliasIniFile(), addGlobal_ilLocator(), addGlobal_ilLog(), addGlobal_ilLoggerFactory(), addGlobal_ilObjDataCache(), addGlobal_ilSetting(), addGlobal_ilTabs(), addGlobal_ilToolbar(), addGlobal_ilUser(), addGlobal_lng(), addGlobal_objDefinition(), addGlobal_rbacreview(), addGlobal_rbacsystem(), addGlobal_refinery(), addGlobal_tpl(), addGlobal_tree(), addGlobal_ui(), addGlobal_uiFactory(), addGlobal_uiRenderer(), addGlobal_upload(), ilTestSettingsChangeConfirmationGUITest\setUp(), ilTestRandomQuestionSetGeneralConfigFormGUITest\setUp(), ilTestRandomQuestionSetPoolDefinitionFormGUITest\setUp(), setUp(), ilTestPassFinishTasksTest\setUp(), ilTestTabsManagerTest\setUp(), ilTestTaxonomyTreeTest\setUp(), ilAssessmentFolderLogAdministrationTableGUITest\setUp(), ilAssessmentFolderLogTableGUITest\setUp(), ilEvaluationAllTableGUITest\setUp(), ilListOfQuestionsTableGUITest\setUp(), ilMarkSchemaTableGUITest\setUp(), ilParticipantsTestResultsTableGUITest\setUp(), ilResultsByQuestionTableGUITest\setUp(), ilTestAggregatedResultsTableGUITest\setUp(), ilTestAverageReachedPointsTableGUITest\setUp(), ilTestDetailedEvaluationStatisticsTableGUITest\setUp(), ilTestDynamicQuestionSetStatisticTableGUITest\setUp(), ilTestExportTableGUITest\setUp(), ilTestHistoryTableGUITest\setUp(), ilTestInviteGroupsTableGUITest\setUp(), ilTestInviteRolesTableGUITest\setUp(), ilTestInviteUsersTableGUITest\setUp(), ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUITest\setUp(), ilTestManScoringParticipantsTableGUITest\setUp(), ilTestParticipantsTableGUITest\setUp(), ilTestPassDetailsOverviewTableGUITest\setUp(), ilTestPassManualScoringOverviewTableGUITest\setUp(), ilTestPassOverviewTableGUITest\setUp(), ilTestPersonalDefaultSettingsTableGUITest\setUp(), ilTestQuestionBrowserTableGUITest\setUp(), ilTestQuestionsTableGUITest\setUp(), ilTestRandomQuestionSelectionTableGUITest\setUp(), ilTestRandomQuestionSetNonAvailablePoolsTableGUITest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest\setUp(), ilTestSkillLevelThresholdsTableGUITest\setUp(), ilTestTopListTableGUITest\setUp(), ilTestVerificationTableGUITest\setUp(), ilTimingOverviewTableGUITest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUITest\setUp(), ilTestResultsToolbarGUITest\setUp(), ilTestSkillEvaluationToolbarGUITest\setUp(), ilObjTestGUITest\testBackObject(), ilObjTestGUITest\testCancelCreateQuestionObject(), ilObjTestGUITest\testCancelRandomSelectObject(), ilObjTestGUITest\testCancelRemoveQuestionsObject(), ilCronFinishUnfinishedTestPassesTest\testGetDescription(), ilCronFinishUnfinishedTestPassesTest\testGetTitle(), ilObjTestGUITest\testMoveQuestionsObject(), ilObjTestGUITest\testOutEvaluationObject(), and ilObjTestGUITest\testRunObject().

+ Here is the caller graph for this function:

◆ setUp()

ilTestBaseTestCase::setUp ( )
protected

Reimplemented in ilTestAnswerOptionalQuestionsConfirmationGUITest, ilTestPassDeletionConfirmationGUITest, ilTestSettingsChangeConfirmationGUITest, ilTestRandomQuestionSetGeneralConfigFormGUITest, ilTestRandomQuestionSetPoolDefinitionFormGUITest, ilAssQuestionPageCommandForwarderTest, ilCronFinishUnfinishedTestPassesTest, ilMarkSchemaGUITest, ilMyTestResultsGUITest, ilMyTestSolutionsGUITest, ilObjAssessmentFolderAccessTest, ilObjAssessmentFolderTest, ilObjTestAccessTest, ilObjTestDynamicQuestionSetConfigGUITest, ilObjTestDynamicQuestionSetConfigTest, ilObjTestGUITest, ilObjTestSettingsGeneralGUITest, ilObjTestTest, ilObjTestVerificationAccessTest, ilObjTestVerificationTest, ilObjTestXMLParserTest, ilParticipantsTestResultsGUITest, ilRandomTestDataTest, ilRandomTestROInputGUITest, ilStatisticsTest, ilTestAccessTest, ilTestArchiveServiceTest, ilTestCorrectionsGUITest, ilTestDashboardGUITest, ilTestDynamicQuestionSetFilterSelectionTest, ilTestDynamicQuestionSetTest, ilTestEvalObjectiveOrientedGUITest, ilTestEvaluationDataTest, ilTestEvaluationGUITest, ilTestEvaluationPassDataTest, ilTestEvaluationTest, ilTestEvaluationUserDataTest, ilTestExportDynamicQuestionSetTest, ilTestExporterTest, ilTestExportFactoryTest, ilTestExportFilenameTest, ilTestExportFixedQuestionSetTest, ilTestExportRandomQuestionSetTest, ilTestExpressPageTest, ilTestFixedQuestionSetConfigGUITest, ilTestFixedQuestionSetConfigTest, ilTestGradingMessageBuilderTest, ilTestImporterTest, ilTestInfoScreenToolbarFactoryTest, ilTestLearningObjectivesStatusGUITest, ilTestNavigationToolbarGUITest, ilTestObjectiveOrientedContainerTest, ilTestParticipantAccessFilterTest, ilTestParticipantDataTest, ilTestParticipantListTest, ilTestParticipantScoringTest, ilTestParticipantsGUITest, ilTestParticipantsTimeExtensionGUITest, ilTestParticipantTest, ilTestPassesSelectorTest, ilTestPassFinishTasksTest, ilTestPasswordCheckerTest, ilTestPasswordProtectionGUITest, ilTestPDFGeneratorTest, ilTestPersonalSkillsGUITest, ilTestPlayerCommandsTest, ilTestPlayerConfirmationModalTest, ilTestPlayerFactoryTest, ilTestPlayerFixedQuestionSetGUITest, ilTestPlayerRandomQuestionSetGUITest, ilTestProcessLockerDbTest, ilTestProcessLockerFactoryTest, ilTestProcessLockerFileTest, ilTestProcessLockerNoneTest, ilTestQuestionHeaderBlockBuilderTest, ilTestQuestionNavigationGUITest, ilTestQuestionRelatedObjectivesListTest, ilTestQuestionSetConfigFactoryTest, ilTestQuestionSideListGUITest, ilTestRandomQuestionCollectionSubsetApplicationListTest, ilTestRandomQuestionCollectionSubsetApplicationTest, ilTestRandomQuestionSetConfigGUITest, ilTestRandomQuestionSetConfigStateMessageHandlerTest, ilTestRandomQuestionSetConfigTest, ilTestRandomQuestionSetNonAvailablePoolTest, ilTestRandomQuestionSetPoolDeriverTest, ilTestRandomQuestionSetQuestionCollectionTest, ilTestRandomQuestionSetQuestionTest, ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest, ilTestRandomQuestionSetSourcePoolDefinitionListTest, ilTestRandomQuestionSetSourcePoolDefinitionTest, ilTestRandomQuestionSetStagingPoolBuilderTest, ilTestRandomQuestionSetStagingPoolQuestionListTest, ilTestRandomQuestionSetStagingPoolQuestionTest, ilTestRandomQuestionsQuantitiesDistributionTest, ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculationTest, ilTestReindexedSequencePositionMapTest, ilTestResultHeaderLabelBuilderTest, ilTestResultsGUITest, ilTestResultsImportParserTest, ilTestResultsToXMLTest, ilTestScoringByQuestionsGUITest, ilTestScoringGUITest, ilTestScoringTest, ilTestSequenceDynamicQuestionSetTest, ilTestSequenceFactoryTest, ilTestSequenceFixedQuestionSetTest, ilTestSequenceRandomQuestionSetTest, ilTestSequenceTest, ilTestServiceGUITest, ilTestServiceTest, ilTestSessionDynamicQuestionSetTest, ilTestSessionFactoryTest, ilTestSessionTest, ilTestSettingsTemplateConfigTest, ilTestSkillAdministrationGUITest, ilTestSkillEvaluationGUITest, ilTestSkillEvaluationTest, ilTestSkillLevelThresholdExporterTest, ilTestSkillLevelThresholdImporterTest, ilTestSkillLevelThresholdImportFailsTest, ilTestSkillLevelThresholdImportListTest, ilTestSkillLevelThresholdImportTest, ilTestSkillLevelThresholdListTest, ilTestSkillLevelThresholdsGUITest, ilTestSkillLevelThresholdTest, ilTestSkillLevelThresholdXmlParserTest, ilTestSkillPointAccountTest, ilTestSubmissionReviewGUITest, ilTestTabsManagerTest, ilTestTaxonomyFilterLabelTranslaterTest, ilTestTaxonomyTreeTest, ilTestToplistGUITest, ilTestTopListTest, ilTestVirtualSequenceRandomQuestionSetTest, ilTestVirtualSequenceTest, ilAssessmentFolderLogAdministrationTableGUITest, ilAssessmentFolderLogTableGUITest, ilEvaluationAllTableGUITest, ilListOfQuestionsTableGUITest, ilMarkSchemaTableGUITest, ilParticipantsTestResultsTableGUITest, ilResultsByQuestionTableGUITest, ilTestAggregatedResultsTableGUITest, ilTestAverageReachedPointsTableGUITest, ilTestDetailedEvaluationStatisticsTableGUITest, ilTestDynamicQuestionSetStatisticTableGUITest, ilTestExportTableGUITest, ilTestHistoryTableGUITest, ilTestInviteGroupsTableGUITest, ilTestInviteRolesTableGUITest, ilTestInviteUsersTableGUITest, ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUITest, ilTestManScoringParticipantsTableGUITest, ilTestParticipantsTableGUITest, ilTestPassDetailsOverviewTableGUITest, ilTestPassManualScoringOverviewTableGUITest, ilTestPassOverviewTableGUITest, ilTestPersonalDefaultSettingsTableGUITest, ilTestQuestionBrowserTableGUITest, ilTestQuestionsTableGUITest, ilTestRandomQuestionSelectionTableGUITest, ilTestRandomQuestionSetNonAvailablePoolsTableGUITest, ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest, ilTestSkillLevelThresholdsTableGUITest, ilTestTopListTableGUITest, ilTestVerificationTableGUITest, ilTimingOverviewTableGUITest, ilTestInfoScreenToolbarGUITest, ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUITest, ilTestResultsToolbarGUITest, and ilTestSkillEvaluationToolbarGUITest.

Definition at line 42 of file ilTestBaseTestCase.php.

42 : void
43 {
44 global $DIC;
45
46 $this->dic = is_object($DIC) ? clone $DIC : $DIC;
47
48 $DIC = new Container();
49
50 $this->addGlobal_tpl();
51 $this->addGlobal_ilDB();
52 $this->addGlobal_ilias();
53 $this->addGlobal_ilLog();
54 $this->addGlobal_ilErr();
55 $this->addGlobal_tree();
56 $this->addGlobal_lng();
59 $this->addGlobal_refinery();
60
61 $this->getMockBuilder(\ILIAS\DI\LoggingServices::class)->disableOriginalConstructor()->getMock();
62
63 $http_mock = $this
64 ->getMockBuilder(\ILIAS\HTTP\Services::class)
65 ->disableOriginalConstructor()
66 ->onlyMethods(['request', 'wrapper'])->getMock();
67
68 $request_mock = $this
69 ->getMockBuilder(\GuzzleHttp\Psr7\ServerRequest::class)
70 ->disableOriginalConstructor()
71 ->onlyMethods(['getParsedBody'])->getMock();
72 $request_mock->method('getParsedBody')->willReturn(array());
73 $http_mock->method('request')->willReturn($request_mock);
74
75 $wrapper_mock = $this->createMock(\ILIAS\HTTP\Wrapper\WrapperFactory::class);
76 $http_mock->method('wrapper')->willReturn($wrapper_mock);
77
78 $this->setGlobalVariable('http', $http_mock);
79
80 parent::setUp();
81 }

References $DIC, addGlobal_ilAppEventHandler(), addGlobal_ilDB(), addGlobal_ilErr(), addGlobal_ilias(), addGlobal_ilLog(), addGlobal_lng(), addGlobal_objDefinition(), addGlobal_refinery(), addGlobal_tpl(), addGlobal_tree(), and setGlobalVariable().

+ Here is the call graph for this function:

◆ tearDown()

ilTestBaseTestCase::tearDown ( )
protected

Reimplemented in ilTestSettingsChangeConfirmationGUITest, ilTestParticipantsGUITest, ilTestParticipantsTimeExtensionGUITest, ilTestResultsGUITest, and ilTestInfoScreenToolbarGUITest.

Definition at line 83 of file ilTestBaseTestCase.php.

83 : void
84 {
85 global $DIC;
86
88
89 parent::tearDown();
90 }

References $DIC, and $dic.

Field Documentation

◆ $dic

Container ilTestBaseTestCase::$dic = null
protected

Definition at line 37 of file ilTestBaseTestCase.php.

Referenced by tearDown().


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