ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilTestBaseTestCaseTrait.php File Reference

Go to the source code of this file.

Functions

 defineGlobalConstants ()
 
 setGlobalVariable (string $name, mixed $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_dataFactory ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilRbacAdmin ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_static_url ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilBench ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_GlobalScreenService ()
 
 addGlobal_ilNavigationHistory ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilComponentFactory ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_uiService ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 
 addGlobal_skillService ()
 
 addGlobal_objectMetadata ()
 
 addGlobal_objectService ()
 
 addGlobal_resourceStorage ()
 
 addGlobal_fileDelivery ()
 
 addGlobal_uiUploadLimitResolver ()
 
 getFileDelivery ()
 
 getTestObjMock ()
 
 buildLocalDICMock ()
 
 adaptDICServiceMock (string $service_name, callable $adapt)
 
 expectTplContent (mixed $expected_content)
 Expect that the template content will be set to the specified expected content. More...
 
 mockCommand (string $command)
 
 expectRedirect (InvocationOrder $expects, string $method)
 
 mockPostRequest (array $properties, array $query_parameters=[])
 
 mockGetRequest (array $query_parameters=[])
 
 mockRequest (string $request_method, array $properties, array $query_parameters)
 

Variables

trait ilTestBaseTestCaseTrait
 

Function Documentation

◆ adaptDICServiceMock()

adaptDICServiceMock ( string  $service_name,
callable  $adapt 
)
protected

Definition at line 502 of file ilTestBaseTestCaseTrait.php.

References $DIC.

Referenced by ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockGetPassedParticipants(), ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockGetResultQuery(), ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockGetUserIds(), ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockReadResultStatusQuery(), ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockUpdateTestAttemptResult(), ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\mockUpdateTestResultCache(), and ILIAS\Test\Tests\Results\Data\TestResultRepositoryTest\testReadFromCache().

502  : void
503  {
504  $reflection_function = new ReflectionFunction($adapt);
505  if ($reflection_function->getNumberOfParameters() !== 1) {
506  throw new \Exception('Callable must have exactly one parameter of type MockObject.');
507  }
508 
509  if (isset($this->services[$service_name])) {
510  global $DIC;
511  if (!isset($DIC[$this->services[$service_name]])) {
512  $DIC[$this->services[$service_name]] = $this->createMock($service_name);
513  }
514 
515  $adapt($DIC[$this->services[$service_name]]);
516  }
517  }
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ addGlobal_dataFactory()

addGlobal_dataFactory ( )
protected

Definition at line 179 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals().

179  : void
180  {
181  $this->setGlobalVariable('DataFactory', $this->createMock(DataFactory::class));
182  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_fileDelivery()

addGlobal_fileDelivery ( )
protected

Definition at line 405 of file ilTestBaseTestCaseTrait.php.

References getFileDelivery(), and setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and ilAssFileUploadUploadsExporterTest\setUp().

405  : void
406  {
407  $this->setGlobalVariable(
408  'file_delivery',
409  $this->getFileDelivery()
410  );
411  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_filesystem()

addGlobal_filesystem ( )
protected

Definition at line 224 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestListGUITest\setUp(), ilObjTestVerificationListGUITest\setUp(), ilTestProcessLockFileStorageTest\setUp(), ilObjTestVerificationGUITest\setUp(), ilObjTestTest\setUp(), ilAssQuestionProcessLockFileStorageTest\setUp(), and assBaseTestCase\setUp().

224  : void
225  {
226  $this->setGlobalVariable('filesystem', $this->createMock(Filesystems::class));
227  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_GlobalScreenService()

addGlobal_GlobalScreenService ( )
protected

Definition at line 277 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestServiceGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestEvaluationGUITest\setUp(), and TestScoringByParticipantGUITest\setUp().

277  : void
278  {
279  $this->setGlobalVariable('global_screen', $this->createMock(ILIAS\GlobalScreen\Services::class));
280  }
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_http()

addGlobal_http ( )
protected

Definition at line 331 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestVerificationGUITest\setUp(), ilTestRandomQuestionSetConfigGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsOfAttemptTableTest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsTableTest\setUp(), and assBaseTestCase\setUp().

331  : void
332  {
333  $request_mock = $this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)
334  ->disableOriginalConstructor()
335  ->getMock();
336  $request_mock->method('getUri')
337  ->willReturn(new GuzzleURI('http://wwww.ilias.de'));
338  $http_mock = $this->getMockBuilder(HTTPServices::class)->disableOriginalConstructor()
339  ->getMock();
340  $http_mock->method('request')
341  ->willReturn($request_mock);
342  $this->setGlobalVariable('http', $http_mock);
343  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilAccess()

addGlobal_ilAccess ( )
protected

Definition at line 174 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestVerificationListGUITest\setUp(), ilObjTestListGUITest\setUp(), ilObjTestVerificationGUITest\setUp(), ilObjTestAccessTest\setUp(), ilTestAccessTest\setUp(), ilTestParticipantsGUITest\setUp(), Test\tests\ilTestQuestionPoolSelectorExplorerTest\setUp(), and assBaseTestCase\setUp().

174  : void
175  {
176  $this->setGlobalVariable('ilAccess', $this->createMock(ilAccess::class));
177  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilAppEventHandler()

addGlobal_ilAppEventHandler ( )
protected

Definition at line 287 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestFolderTest\setUp(), ilTestTaxonomyTreeTest\setUp(), ilObjTestVerificationTest\setUp(), ilObjTestTest\setUp(), and ilObjQuestionPoolTest\setUp().

287  : void
288  {
289  $this->setGlobalVariable('ilAppEventHandler', $this->createMock(ilAppEventHandler::class));
290  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilBench()

addGlobal_ilBench ( )
protected

Definition at line 257 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and ilObjQuestionPoolTest\setUp().

257  : void
258  {
259  $this->setGlobalVariable('ilBench', $this->createMock(ilBenchmark::class));
260  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilComponentFactory()

addGlobal_ilComponentFactory ( )
protected

Definition at line 302 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestParticipantsGUITest\setUp(), ilObjTestTest\setUp(), and assBaseTestCase\setUp().

302  : void
303  {
304  $this->setGlobalVariable('component.factory', $this->createMock(ilComponentFactory::class));
305  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilComponentRepository()

addGlobal_ilComponentRepository ( )
protected

Definition at line 297 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and assBaseTestCase\setUp().

297  : void
298  {
299  $this->setGlobalVariable('component.repository', $this->createMock(ilComponentRepository::class));
300  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilCtrl()

addGlobal_ilCtrl ( )
protected

Definition at line 214 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestRandomQuestionSetConfigGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsOfAttemptTableTest\setUp(), assBaseTestCase\setUp(), and Results\Toplist\DataRetrievalTest\setUp().

214  : void
215  {
216  $this->setGlobalVariable('ilCtrl', $this->createMock(ilCtrl::class));
217  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilDB()

addGlobal_ilDB ( )
protected

Definition at line 239 of file ilTestBaseTestCaseTrait.php.

References ilDBConstants\MODULE_MANAGER, ilDBConstants\MODULE_REVERSE, null, and setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestFolderTest\setUp(), ilObjTestVerificationTest\setUp(), ilCronFinishUnfinishedTestPassesTest\setUp(), assBaseTestCase\setUp(), and ilTestSkillLevelThresholdXmlParserTest\testInitSkillLevelThresholdImportList().

239  : void
240  {
241  $db = $this->createMock(ilDBInterface::class);
242  $db
243  ->method('loadModule')
244  ->willReturnCallback(
245  function ($module): ilDBPdoManager|ilDBPdoReverse|null {
246  return match ($module) {
247  ilDBConstants::MODULE_MANAGER => $this->createMock(ilDBPdoManager::class),
248  ilDBConstants::MODULE_REVERSE => $this->createMock(ilDBPdoReverse::class),
249  default => null
250  };
251  }
252  );
253 
254  $this->setGlobalVariable('ilDB', $db);
255  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Class ilDBPdoReverse.
Class ilDBPdoManager.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilErr()

addGlobal_ilErr ( )
protected

◆ addGlobal_ilHelp()

addGlobal_ilHelp ( )
protected

Definition at line 355 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestServiceGUITest\setUp(), ilTestEvaluationGUITest\setUp(), TestScoringByParticipantGUITest\setUp(), and assBaseTestCase\setUp().

355  : void
356  {
357  $this->setGlobalVariable('ilHelp', $this->createMock(ilHelpGUI::class));
358  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilias()

addGlobal_ilias ( )
protected

Definition at line 267 of file ilTestBaseTestCaseTrait.php.

References getIliasMock(), and setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestFolderTest\setUp(), ilObjTestVerificationTest\setUp(), ILIAS\Test\Tests\ExportFixedQuestionSetTest\setUp(), ilObjQuestionPoolTest\setUp(), and ilQuestionpoolExportTest\setUp().

267  : void
268  {
269  $this->setGlobalVariable('ilias', $this->getIliasMock());
270  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilIliasIniFile()

addGlobal_ilIliasIniFile ( )
protected

Definition at line 345 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by assBaseTestCase\setUp().

345  : void
346  {
347  $this->setGlobalVariable('ilIliasIniFile', $this->createMock(ilIniFile::class));
348  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilLocator()

addGlobal_ilLocator ( )
protected

Definition at line 317 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and ilObjTestVerificationGUITest\setUp().

317  : void
318  {
319  $this->setGlobalVariable('ilLocator', $this->createMock(ilLocatorGUI::class));
320  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilLog()

addGlobal_ilLog ( )
protected

◆ addGlobal_ilLoggerFactory()

addGlobal_ilLoggerFactory ( )
protected

Definition at line 350 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilECSTestSettingsTest\setUp(), ilObjTestListGUITest\setUp(), ilObjTestVerificationListGUITest\setUp(), ilQuestionPageParserTest\setUp(), and ilObjQuestionPoolListGUITest\setUp().

350  : void
351  {
352  $this->setGlobalVariable('ilLoggerFactory', $this->createMock(ilLoggerFactory::class));
353  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilNavigationHistory()

addGlobal_ilNavigationHistory ( )
protected

Definition at line 282 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestServiceGUITest\setUp(), ilTestEvaluationGUITest\setUp(), TestScoringByParticipantGUITest\setUp(), and ilObjQuestionPoolGUITest\setUp().

282  : void
283  {
284  $this->setGlobalVariable('ilNavigationHistory', $this->createMock(ilNavigationHistory::class));
285  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilObjDataCache()

addGlobal_ilObjDataCache ( )
protected

◆ addGlobal_ilRbacAdmin()

addGlobal_ilRbacAdmin ( )
protected

Definition at line 209 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilECSTestSettingsTest\setUp(), and ilObjTestVerificationGUITest\setUp().

209  : void
210  {
211  $this->setGlobalVariable('rbacadmin', $this->createMock(ilRbacAdmin::class));
212  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilSetting()

◆ addGlobal_ilTabs()

◆ addGlobal_ilToolbar()

◆ addGlobal_ilUser()

addGlobal_ilUser ( )
protected

Definition at line 184 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestParticipantListTest\setUp(), ilTestRandomQuestionSetConfigGUITest\setUp(), ilObjTestAccessTest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsOfAttemptTableTest\setUp(), ilTestVerificationTableGUITest\setUp(), ilCronFinishUnfinishedTestPassesTest\setUp(), assBaseTestCase\setUp(), and Results\Toplist\DataRetrievalTest\setUp().

184  : void
185  {
186  $this->setGlobalVariable('ilUser', $this->createMock(ilObjUser::class));
187  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_lng()

addGlobal_lng ( )
protected

Definition at line 219 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestNavigationToolbarGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsOfAttemptTableTest\setUp(), ilCronFinishUnfinishedTestPassesTest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsTableTest\setUp(), assBaseTestCase\setUp(), and Results\Toplist\DataRetrievalTest\setUp().

219  : void
220  {
221  $this->setGlobalVariable('lng', $this->createMock(ilLanguage::class));
222  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_objDefinition()

addGlobal_objDefinition ( )
protected

Definition at line 189 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestVerificationTest\setUp(), ilObjTestFolderTest\setUp(), ilObjQuestionPoolTest\setUp(), ilObjQuestionPoolListGUITest\setUp(), ilAssSpecFeedbackPageTest\setUp(), ilAssQuestionPageTest\setUp(), ilAssGenFeedbackPageTest\setUp(), ilQuestionUsagesTableGUITest\setUp(), and ilSolutionExplorerTest\setUp().

189  : void
190  {
191  $this->setGlobalVariable('objDefinition', $this->createMock(ilObjectDefinition::class));
192  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_objectMetadata()

addGlobal_objectMetadata ( )
protected

Definition at line 387 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and assBaseTestCase\setUp().

387  : void
388  {
389  $this->setGlobalVariable('learning_object_metadata', $this->createMock(ILIAS\MetaData\Services\ServicesInterface::class));
390  }
Interface Observer Contains several chained tasks and infos about them.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_objectService()

addGlobal_objectService ( )
protected

Definition at line 392 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and assBaseTestCase\setUp().

392  : void
393  {
394  $this->setGlobalVariable('object.customicons.factory', $this->getMockBuilder(ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Factory::class)->disableOriginalConstructor()->getMock());
395  $object_mock = $this->getMockBuilder(\ilObjectService::class)->disableOriginalConstructor()->getMock();
396 
397  $this->setGlobalVariable('object', $object_mock);
398  }
Interface Observer Contains several chained tasks and infos about them.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_rbacreview()

addGlobal_rbacreview ( )
protected

Definition at line 322 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestListGUITest\setUp(), ilObjTestVerificationGUITest\setUp(), ilObjTestVerificationListGUITest\setUp(), and assBaseTestCase\setUp().

322  : void
323  {
324  $this->setGlobalVariable('rbacreview', $this->createMock(ilRbacReview::class));
325  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_rbacsystem()

addGlobal_rbacsystem ( )
protected

Definition at line 204 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestListGUITest\setUp(), ilObjTestVerificationListGUITest\setUp(), ilObjTestVerificationGUITest\setUp(), ilObjTestAccessTest\setUp(), ilTestEvaluationGUITest\setUp(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestServiceGUITest\setUp(), TestScoringByParticipantGUITest\setUp(), and assBaseTestCase\setUp().

204  : void
205  {
206  $this->setGlobalVariable('rbacsystem', $this->createMock(ilRbacSystem::class));
207  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_refinery()

addGlobal_refinery ( )
protected

Definition at line 375 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsTableTest\setUp(), and assBaseTestCase\setUp().

375  : void
376  {
377  $refineryMock = $this->getMockBuilder(RefineryFactory::class)->disableOriginalConstructor()->getMock();
378  $refineryMock->expects(self::any())->method('random')->willReturn($this->getMockBuilder(RandomGroup::class)->getMock());
379  $this->setGlobalVariable('refinery', $refineryMock);
380  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_resourceStorage()

addGlobal_resourceStorage ( )
protected

Definition at line 400 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ILIAS\Test\Tests\ExportImport\ExportRandomQuestionSetTest\setUp(), ILIAS\Test\Tests\ExportFixedQuestionSetTest\setUp(), ilAssFileUploadUploadsExporterTest\setUp(), assFileUploadFileTableGUITest\setUp(), and assBaseTestCase\setUp().

400  : void
401  {
402  $this->setGlobalVariable('resource_storage', $this->createMock(\ILIAS\ResourceStorage\Services::class));
403  }
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_skillService()

addGlobal_skillService ( )
protected

Definition at line 382 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

382  : void
383  {
384  $this->setGlobalVariable('skill', $this->createMock(ILIAS\Skill\Service\SkillService::class));
385  }
Interface Observer Contains several chained tasks and infos about them.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:

◆ addGlobal_static_url()

addGlobal_static_url ( )
protected

Definition at line 229 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and assBaseTestCase\setUp().

229  : void
230  {
231  $this->setGlobalVariable('static_url', $this->createMock(ILIAS\StaticURL\Services::class));
232  }
Interface Observer Contains several chained tasks and infos about them.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_tpl()

addGlobal_tpl ( )
protected

Definition at line 292 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), MarkSchemaGUITest\setUp(), and assBaseTestCase\setUp().

292  : void
293  {
294  $this->setGlobalVariable('tpl', $this->createMock(ilGlobalPageTemplate::class));
295  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_tree()

addGlobal_tree ( )
protected

Definition at line 194 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), ilObjTestVerificationTest\setUp(), ilTestRandomQuestionSetConfigGUITest\setUp(), ilObjTestFolderTest\setUp(), and assBaseTestCase\setUp().

194  : void
195  {
196  $this->setGlobalVariable('tree', $this->createMock(ilTree::class));
197  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_uiFactory()

addGlobal_uiFactory ( )
protected

Definition at line 365 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), assFormulaQuestionGUITest\setUp(), assClozeTestGUITest\setUp(), ilSingleChoiceWizardInputGUITest\setUp(), ilQuestionBrowserTableGUITest\setUp(), ilMultipleTextsInputGUITest\setUp(), ilMultipleImagesInputGUITest\setUp(), ilMultipleChoiceWizardInputGUITest\setUp(), ilMatchingWizardInputGUITest\setUp(), ilMatchingPairWizardInputGUITest\setUp(), ilAssAnswerCorrectionsInputGUITest\setUp(), ilLocalUnitCategoryTableGUITest\setUp(), ilKprimChoiceWizardInputGUITest\setUp(), ilKprimChoiceCorrectionsInputGUITest\setUp(), ilImagemapFileInputGUITest\setUp(), ilImagemapCorrectionsInputGUITest\setUp(), ilGlobalUnitCategoryTableGUITest\setUp(), ilAssSingleChoiceCorrectionsInputGUITest\setUp(), ilUnitCategoryTableGUITest\setUp(), ilAssQuestionSkillAssignmentPropertyFormGUITest\setUp(), ilAssOrderingTextsInputGUITest\setUp(), ilAssOrderingImagesInputGUITest\setUp(), ilLogicalAnswerComparisonExpressionInputGUITest\setUp(), ilAssMatchingPairCorrectionsInputGUITest\setUp(), ilAssLongmenuCorrectionsInputGUITest\setUp(), ilEssayKeywordWizardInputGUITest\setUp(), ilAssClozeTestCombinationVariantsInputGUITest\setUp(), ilAnswerWizardInputGUITest\setUp(), ilAssMultipleChoiceCorrectionsInputGUITest\setUp(), ilUnitTableGUITest\setUp(), assLongMenuGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsTableTest\setUp(), and assBaseTestCase\setUp().

365  : void
366  {
367  $this->setGlobalVariable('ui.factory', $this->createMock(FactoryInternal::class));
368  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_uiRenderer()

addGlobal_uiRenderer ( )
protected

Definition at line 370 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), assFormulaQuestionGUITest\setUp(), assClozeTestGUITest\setUp(), ilSingleChoiceWizardInputGUITest\setUp(), ilQuestionBrowserTableGUITest\setUp(), ilMultipleTextsInputGUITest\setUp(), ilMultipleImagesInputGUITest\setUp(), ilMultipleChoiceWizardInputGUITest\setUp(), ilMatchingWizardInputGUITest\setUp(), ilMatchingPairWizardInputGUITest\setUp(), ilLogicalAnswerComparisonExpressionInputGUITest\setUp(), ilLocalUnitCategoryTableGUITest\setUp(), ilKprimChoiceWizardInputGUITest\setUp(), ilKprimChoiceCorrectionsInputGUITest\setUp(), ilImagemapFileInputGUITest\setUp(), ilImagemapCorrectionsInputGUITest\setUp(), ilGlobalUnitCategoryTableGUITest\setUp(), ilAssClozeTestCombinationVariantsInputGUITest\setUp(), ilAssSingleChoiceCorrectionsInputGUITest\setUp(), ilAssQuestionSkillAssignmentPropertyFormGUITest\setUp(), ilAssOrderingTextsInputGUITest\setUp(), ilAssOrderingImagesInputGUITest\setUp(), ilAssMultipleChoiceCorrectionsInputGUITest\setUp(), ilAssMatchingPairCorrectionsInputGUITest\setUp(), ilAssLongmenuCorrectionsInputGUITest\setUp(), ilEssayKeywordWizardInputGUITest\setUp(), ilAssAnswerCorrectionsInputGUITest\setUp(), ilAnswerWizardInputGUITest\setUp(), assLongMenuGUITest\setUp(), ilUnitTableGUITest\setUp(), ilUnitCategoryTableGUITest\setUp(), and assBaseTestCase\setUp().

370  : void
371  {
372  $this->setGlobalVariable('ui.renderer', $this->createMock(ILIAS\UI\Implementation\DefaultRenderer::class));
373  }
Interface Observer Contains several chained tasks and infos about them.
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_uiService()

addGlobal_uiService ( )
protected

Definition at line 360 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals().

360  : void
361  {
362  $this->setGlobalVariable('uiService', $this->createMock(\ilUIService::class));
363  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_uiUploadLimitResolver()

◆ addGlobal_upload()

addGlobal_upload ( )
protected

Definition at line 234 of file ilTestBaseTestCaseTrait.php.

References setGlobalVariable().

Referenced by ilTestBaseTestCase\addGlobals(), and assBaseTestCase\setUp().

234  : void
235  {
236  $this->setGlobalVariable('upload', $this->createMock(FileUpload::class));
237  }
setGlobalVariable(string $name, mixed $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLocalDICMock()

buildLocalDICMock ( )
protected

Definition at line 451 of file ilTestBaseTestCaseTrait.php.

References $c.

Referenced by getTestObjMock().

452  {
453  $local_dic_mock = $this->getMockBuilder(ILIAS\Test\TestDIC::class)
454  ->onlyMethods([])->getMock();
455  $local_dic_mock['question.general_properties.repository'] = fn(Pimple\Container $c)
456  => $this->createMock(
457  ILIAS\TestQuestionPool\Questions\GeneralQuestionPropertiesRepository::class
458  );
459  $local_dic_mock['request_data_collector'] = fn(Pimple\Container $c)
460  => $this->createMock(
461  \ILIAS\Test\RequestDataCollector::class
462  );
463  $local_dic_mock['participant.access_filter.factory'] = fn(Pimple\Container $c)
464  => $this->createMock(
465  \ilTestParticipantAccessFilterFactory::class
466  );
467  $local_dic_mock['logging.logger'] = fn(Pimple\Container $c)
468  => $this->createMock(
469  \ILIAS\Test\Logging\TestLogger::class
470  );
471  $local_dic_mock['logging.viewer'] = fn(Pimple\Container $c)
472  => $this->createMock(
473  \ILIAS\Test\Logging\TestLogViewer::class
474  );
475  $local_dic_mock['shuffler'] = fn(Pimple\Container $c)
476  => $this->createMock(
477  \ilTestShuffler::class
478  );
479  $local_dic_mock['results.presentation.factory'] = fn(Pimple\Container $c)
480  => $this->createMock(
481  ILIAS\Test\Results\Presentation\Factory::class
482  );
483  $local_dic_mock['results.data.factory'] = fn(Pimple\Container $c)
484  => $this->createMock(
485  ILIAS\Test\Results\Data\Factory::class
486  );
487  $local_dic_mock['results.toplist.repository'] = fn(Pimple\Container $c)
488  => $this->createMock(
489  ILIAS\Test\Results\Toplist\TestTopListRepository::class
490  );
491  $local_dic_mock['results.data.repository'] = fn(Pimple\Container $c)
492  => $this->createMock(
493  \ILIAS\Test\Results\Data\Repository::class
494  );
495  $local_dic_mock['questions.properties.repository'] = fn(Pimple\Container $c)
496  => $this->createMock(
497  ILIAS\Test\Questions\Properties\Repository::class
498  );
499  return $local_dic_mock;
500  }
Interface Observer Contains several chained tasks and infos about them.
$c
Definition: deliver.php:25
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ defineGlobalConstants()

defineGlobalConstants ( )
protected

Definition at line 94 of file ilTestBaseTestCaseTrait.php.

Referenced by ilTestBaseTestCase\addGlobals(), assBaseTestCase\setUp(), and ilTestBaseTestCase\setUp().

94  : void
95  {
96  if (!defined('ILIAS_HTTP_PATH')) {
97  define('ILIAS_HTTP_PATH', 'http://localhost');
98  }
99  if (!defined('CLIENT_DATA_DIR')) {
100  define('CLIENT_DATA_DIR', '/var/iliasdata');
101  }
102  if (!defined('IL_INST_ID')) {
103  define('IL_INST_ID', '0');
104  }
105  if (!defined('ANONYMOUS_USER_ID')) {
106  define('ANONYMOUS_USER_ID', 13);
107  }
108  if (!defined('ANONYMOUS_USER_ID')) {
109  define('ANONYMOUS_USER_ID', 13);
110  }
111  if (!defined('ROOT_FOLDER_ID')) {
112  define('ROOT_FOLDER_ID', 8);
113  }
114  if (!defined('ILIAS_LOG_ENABLED')) {
115  define('ILIAS_LOG_ENABLED', true);
116  }
117  if (!defined('ILIAS_LOG_DIR')) {
118  define('ILIAS_LOG_DIR', '/var/log');
119  }
120  if (!defined('ILIAS_LOG_FILE')) {
121  define('ILIAS_LOG_FILE', '/var/log/ilias.log');
122  }
123  }
+ Here is the caller graph for this function:

◆ expectRedirect()

expectRedirect ( InvocationOrder  $expects,
string  $method 
)

Definition at line 532 of file ilTestBaseTestCaseTrait.php.

532  : void
533  {
534  $this->dic['ilCtrl']->expects($expects)->method('redirect')->with($this->anything(), $this->equalTo($method));
535  }

◆ expectTplContent()

expectTplContent ( mixed  $expected_content)
protected

Expect that the template content will be set to the specified expected content.

Definition at line 522 of file ilTestBaseTestCaseTrait.php.

522  : void
523  {
524  $this->dic['tpl']->expects($this->once())->method('setContent')->with($expected_content);
525  }

◆ getDatabaseMock()

◆ getFileDelivery()

getFileDelivery ( )
protected

Definition at line 418 of file ilTestBaseTestCaseTrait.php.

Referenced by addGlobal_fileDelivery(), assFileUploadTest\setUp(), and assFileUploadGUITest\setUp().

419  {
420  $data_signer = new ILIAS\FileDelivery\Token\DataSigner(
421  new ILIAS\FileDelivery\Token\Signer\Key\Secret\SecretKeyRotation(
422  new ILIAS\FileDelivery\Token\Signer\Key\Secret\SecretKey('blup')
423  )
424  );
425  $http_mock = $this->createMock(HTTPServices::class);
426  $response_builder_mock = $this->createMock(\ILIAS\FileDelivery\Delivery\ResponseBuilder\ResponseBuilder::class);
427  return new \ILIAS\FileDelivery\Services(
428  new ILIAS\FileDelivery\Delivery\StreamDelivery(
429  $data_signer,
430  $http_mock,
431  $response_builder_mock,
432  $response_builder_mock
433  ),
434  new \ILIAS\FileDelivery\Delivery\LegacyDelivery(
435  $http_mock,
436  $response_builder_mock,
437  $response_builder_mock
438  ),
439  $data_signer,
440  $http_mock
441  );
442  }
Token
The string representation of these tokens must not occur in the names of metadata elements...
Definition: Token.php:27
Interface Observer Contains several chained tasks and infos about them.
+ Here is the caller graph for this function:

◆ getGlobalTemplateMock()

getGlobalTemplateMock ( )
protected
Returns
ilTemplate|mixed|MockObject

Definition at line 144 of file ilTestBaseTestCaseTrait.php.

145  {
146  return $this->createMock(ilTemplate::class);
147  }

◆ getIliasMock()

◆ getTestObjMock()

getTestObjMock ( )
protected

Definition at line 444 of file ilTestBaseTestCaseTrait.php.

References buildLocalDICMock().

Referenced by ilTestPasswordCheckerTest\setUp(), ilTestServiceTest\setUp(), ilTestRandomQuestionSetPoolDefinitionFormGUITest\setUp(), ilAssQuestionPageCommandForwarderTest\setUp(), ilTestArchiveServiceTest\setUp(), ilTestServiceGUITest\setUp(), ilTestPlayerFactoryTest\setUp(), ilTestSessionFactoryTest\setUp(), ilTestEvalObjectiveOrientedGUITest\setUp(), ilTestPlayerRandomQuestionSetGUITest\setUp(), ilTestSkillEvaluationGUITest\setUp(), ilTestQuestionSetConfigFactoryTest\setUp(), ilTestVirtualSequenceRandomQuestionSetTest\setUp(), ilTestVirtualSequenceTest\setUp(), ilTestEvaluationGUITest\setUp(), ilTestRandomQuestionSetConfigGUITest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest\setUp(), ilTestFixedQuestionSetConfigTest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\setUp(), ilTestGradingMessageBuilderTest\setUp(), ilTestParticipantListTest\setUp(), ilTestParticipantsGUITest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionTest\setUp(), ilTestInfoScreenToolbarGUITest\setUp(), ilTestPassesSelectorTest\setUp(), ilTestRandomQuestionSetStagingPoolBuilderTest\setUp(), ilTestResultsGUITest\setUp(), ilTestSkillAdministrationGUITest\setUp(), ilTestSkillLevelThresholdsTableGUITest\setUp(), ilTestPassDetailsOverviewTableGUITest\setUp(), MarkSchemaGUITest\setUp(), ILIAS\Test\Tests\Questions\Presentation\QuestionsOfAttemptTableTest\setUp(), ilResultsByQuestionTableGUITest\setUp(), ilTestPassOverviewTableGUITest\setUp(), ilTestPersonalDefaultSettingsTableGUITest\setUp(), ilTestQuestionBrowserTableGUITest\setUp(), TestScoringByParticipantGUITest\setUp(), TestScoringTest\setUp(), ilTestToplistGUITest\setUp(), ilMyTestSolutionsGUITest\setUp(), ILIAS\Test\Tests\ExportImport\ExportRandomQuestionSetTest\setUp(), TestScoringByParticipantTableGUITest\setUp(), ilMyTestResultsGUITest\setUp(), TestScoringByParticipantPassesOverviewTableGUITest\setUp(), ILIAS\Test\Tests\Presentation\TabsManagerTest\setUp(), Results\Toplist\DataRetrievalTest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testAddDefinition(), ILIAS\Test\Tests\ExportImport\ResultsExportExcelTest\testConstruct(), ILIAS\Test\Tests\Presentation\TestScreenGUITest\testConstruct(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testGetDefinition(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testGetDefinitionBySourcePoolId(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testGetDefinitionCount(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testGetDefinitionIds(), ilTestRandomQuestionSetSourcePoolDefinitionListTest\testHasDefinition(), SettingsScoringGUITest\testScoringResultsGUIConstruct(), and ilObjTestXMLParserTest\testTestOBJ().

444  : ilObjTest
445  {
446  return $this->createConfiguredMock(ilObjTest::class, [
447  'getLocalDIC' => $this->buildLocalDICMock()
448  ]);
449  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mockCommand()

mockCommand ( string  $command)

Definition at line 527 of file ilTestBaseTestCaseTrait.php.

527  : void
528  {
529  $this->dic['ilCtrl']->method('getCmd')->willReturn($command);
530  }

◆ mockGetRequest()

mockGetRequest ( array  $query_parameters = [])

Definition at line 542 of file ilTestBaseTestCaseTrait.php.

References mockRequest().

542  : void
543  {
544  $this->mockRequest('GET', [], $query_parameters);
545  }
mockRequest(string $request_method, array $properties, array $query_parameters)
+ Here is the call graph for this function:

◆ mockPostRequest()

mockPostRequest ( array  $properties,
array  $query_parameters = [] 
)

Definition at line 537 of file ilTestBaseTestCaseTrait.php.

References mockRequest().

537  : void
538  {
539  $this->mockRequest('POST', $properties, $query_parameters);
540  }
mockRequest(string $request_method, array $properties, array $query_parameters)
+ Here is the call graph for this function:

◆ mockRequest()

mockRequest ( string  $request_method,
array  $properties,
array  $query_parameters 
)
private

Definition at line 547 of file ilTestBaseTestCaseTrait.php.

References $_SERVER.

Referenced by mockGetRequest(), and mockPostRequest().

547  : void
548  {
549  $_SERVER['REQUEST_METHOD'] = $request_method;
550  $request = $this->createConfiguredMock(ServerRequestInterface::class, [
551  'getServerParams' => ['REQUEST_METHOD' => $request_method],
552  'getParsedBody' => $properties,
553  'getQueryParams' => $query_parameters
554  ]);
555  $this->dic['http']->method('request')->willReturn($request);
556  $this->dic['http']->method('wrapper')->willReturn(new WrapperFactory($request));
557  }
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 129 of file ilTestBaseTestCaseTrait.php.

References $c, $DIC, and $GLOBALS.

Referenced by addGlobal_dataFactory(), addGlobal_fileDelivery(), addGlobal_filesystem(), addGlobal_GlobalScreenService(), addGlobal_http(), addGlobal_ilAccess(), addGlobal_ilAppEventHandler(), addGlobal_ilBench(), addGlobal_ilComponentFactory(), addGlobal_ilComponentRepository(), addGlobal_ilCtrl(), addGlobal_ilDB(), addGlobal_ilErr(), addGlobal_ilHelp(), addGlobal_ilias(), addGlobal_ilIliasIniFile(), addGlobal_ilLocator(), addGlobal_ilLog(), addGlobal_ilLoggerFactory(), addGlobal_ilNavigationHistory(), addGlobal_ilObjDataCache(), addGlobal_ilRbacAdmin(), addGlobal_ilSetting(), addGlobal_ilTabs(), addGlobal_ilToolbar(), addGlobal_ilUser(), addGlobal_lng(), addGlobal_objDefinition(), addGlobal_objectMetadata(), addGlobal_objectService(), addGlobal_rbacreview(), addGlobal_rbacsystem(), addGlobal_refinery(), addGlobal_resourceStorage(), addGlobal_skillService(), addGlobal_static_url(), addGlobal_tpl(), addGlobal_tree(), addGlobal_uiFactory(), addGlobal_uiRenderer(), addGlobal_uiService(), addGlobal_uiUploadLimitResolver(), addGlobal_upload(), ilTestRandomQuestionSetPoolDefinitionFormGUITest\setUp(), assKprimChoiceTest\setUp(), RequestValidationHelperTest\setUp(), ilTestTaxonomyTreeTest\setUp(), ilTestRandomQuestionSetGeneralConfigFormGUITest\setUp(), ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUITest\setUp(), ilTestSkillEvaluationToolbarGUITest\setUp(), assOrderingHorizontalGUITest\setUp(), assMatchingQuestionGUITest\setUp(), assClozeTestTest\setUp(), assErrorTextGUITest\setUp(), assNumericGUITest\setUp(), assFileUploadTest\setUp(), assTextSubsetGUITest\setUp(), assFileUploadGUITest\setUp(), assMatchingQuestionTest\setUp(), ilResultsByQuestionTableGUITest\setUp(), ilTestPassOverviewTableGUITest\setUp(), assOrderingHorizontalTest\setUp(), ilTestPersonalDefaultSettingsTableGUITest\setUp(), ilTestQuestionBrowserTableGUITest\setUp(), assNumericTest\setUp(), assTextQuestionTest\setUp(), assTextSubsetTest\setUp(), assImagemapQuestionTest\setUp(), assErrorTextTest\setUp(), ilTestPassDetailsOverviewTableGUITest\setUp(), assFormulaQuestionGUITest\setUp(), assOrderingQuestionTest\setUp(), assOrderingQuestionGUITest\setUp(), ilTestSkillLevelThresholdsTableGUITest\setUp(), assTextQuestionGUITest\setUp(), ilTestVerificationTableGUITest\setUp(), assMultipleChoiceTest\setUp(), assMultipleChoiceGUITest\setUp(), assSingleChoiceTest\setUp(), assClozeGapTest\setUp(), assSingleChoiceGUITest\setUp(), TestScoringByParticipantPassesOverviewTableGUITest\setUp(), TestScoringByParticipantTableGUITest\setUp(), assClozeTestGUITest\setUp(), assFormulaQuestionTest\setUp(), ilObjQuestionPoolGUITest\setUp(), assLongmenuTest\setUp(), ilObjTestGUITest\testCancelCreateQuestionObject(), ilCronFinishUnfinishedTestPassesTest\testGetDescription(), ilCronFinishUnfinishedTestPassesTest\testGetTitle(), assClozeTestGUITest\testInstantiateObjectShouldReturnInstance(), and ilObjTestGUITest\testRunObject().

129  : void
130  {
131  global $DIC;
132 
133  $GLOBALS[$name] = $value;
134 
135  unset($DIC[$name]);
136  $DIC[$name] = static function (Container $c) use ($value) {
137  return $value;
138  };
139  }
$c
Definition: deliver.php:25
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

Variable Documentation

◆ ilTestBaseTestCaseTrait

trait ilTestBaseTestCaseTrait
Initial value:
{
private array $services = [
ilAccess::class => 'ilAccess',
ilAccessHandler::class => 'ilAccess'

Definition at line 43 of file ilTestBaseTestCaseTrait.php.