19 declare(strict_types=1);
43 protected function setUp(): void
47 $this->dic = is_object($DIC) ? clone
$DIC :
$DIC;
66 $this->getMockBuilder(\
ILIAS\
DI\LoggingServices::class)->disableOriginalConstructor()->getMock();
69 ->getMockBuilder(\
ILIAS\
HTTP\Services::class)
70 ->disableOriginalConstructor()
71 ->onlyMethods([
'request',
'wrapper'])->getMock();
74 ->getMockBuilder(\GuzzleHttp\Psr7\ServerRequest::class)
75 ->disableOriginalConstructor()
76 ->onlyMethods([
'getParsedBody'])->getMock();
77 $request_mock->method(
'getParsedBody')->willReturn(array());
78 $http_mock->method(
'request')->willReturn($request_mock);
80 $wrapper_mock = $this->createMock(\
ILIAS\
HTTP\Wrapper\WrapperFactory::class);
81 $http_mock->method(
'wrapper')->willReturn($wrapper_mock);
108 $DIC[$name] =
static function (
Container $c) use ($value) {
118 return $this->getMockBuilder(ilTemplate::class)->disableOriginalConstructor()->getMock();
126 return $this->getMockBuilder(ilDBInterface::class)->disableOriginalConstructor()->getMock();
134 $mock = $this->getMockBuilder(ILIAS::class)->disableOriginalConstructor()->getMock();
138 $account->fullname =
'Esther Tester';
140 $mock->account = $account;
157 $this->
setGlobalVariable(
"objDefinition", $this->createMock(ilObjectDefinition::class));
232 $this->
setGlobalVariable(
"ilNavigationHistory", $this->createMock(ilNavigationHistory::class));
237 $this->
setGlobalVariable(
"ilAppEventHandler", $this->createMock(ilAppEventHandler::class));
247 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
252 $this->
setGlobalVariable(
"component.factory", $this->createMock(ilComponentFactory::class));
262 $this->
setGlobalVariable(
"ilObjDataCache", $this->createMock(ilObjectDataCache::class));
282 $http_mock = $this->getMockBuilder(Services::class)->disableOriginalConstructor()->getMock();
283 $http_mock->method(
'request')->willReturn($this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)->disableOriginalConstructor()->getMock());
294 $this->
setGlobalVariable(
"ilLoggerFactory", $this->createMock(ilLoggerFactory::class));
319 $refineryMock = $this->getMockBuilder(RefineryFactory::class)->disableOriginalConstructor()->getMock();
320 $refineryMock->expects(self::any())->method(
'random')->willReturn($this->getMockBuilder(RandomGroup::class)->getMock());
332 $DIC[
'object.customicons.factory'] = $this->getMockBuilder(ilObjectCustomIconFactory::class)->disableOriginalConstructor()->getMock();
333 $object_mock = $this->getMockBuilder(\ilObjectService::class)->disableOriginalConstructor()->getMock();
340 $this->
setGlobalVariable(
"resource_storage", $this->createMock(ResourceStorage::class));
345 $test_mock = $this->createMock(ilObjTest::class);
346 $test_mock->method(
'getLocalDIC')
addGlobal_ilLoggerFactory()
addGlobal_resourceStorage()
addGlobal_objDefinition()
addGlobal_GlobalScreenService()
Class ChatMainBarProvider .
addGlobal_ilIliasIniFile()
addGlobal_ilComponentFactory()
addGlobal_ilComponentRepository()
Customizing of pimple-DIC for ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addGlobal_ilNavigationHistory()
setGlobalVariable(string $name, $value)
addGlobal_ilAppEventHandler()
addGlobal_ilObjDataCache()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addGlobal_objectService()