19 declare(strict_types=1);
55 protected function setUp(): void
58 if (!defined(
'ILIAS_HTTP_PATH')) {
59 define(
'ILIAS_HTTP_PATH',
'https://ilias.de/');
61 if (!defined(
'CLIENT_ID')) {
62 define(
'CLIENT_ID',
'client');
64 if (!defined(
'SYSTEM_FOLDER_ID')) {
65 define(
'SYSTEM_FOLDER_ID', 0);
67 $this->dic_backup = is_object($DIC) ? clone
$DIC :
$DIC;
69 $this->provider_factory_mock = $this->createMock(ProviderFactory::class);
70 $this->gs_mock = $DIC[
'global_screen'] =
new Services($this->provider_factory_mock);
71 $this->db_mock = $DIC[
'ilDB'] = $this->createMock(ilDBInterface::class);
72 $this->dic_mock[
'ilUser'] = $DIC[
'ilUser'] = $this->createMock(ilObjUser::class);
73 $this->dic_mock[
'ilSetting'] = $DIC[
'ilSetting'] = $this->createMock(ilSetting::class);
74 $this->dic_mock[
'rbacsystem'] = $DIC[
'rbacsystem'] = $this->createMock(ilRbacSystem::class);
75 $this->dic_mock[
'lng'] = $DIC[
'lng'] = $this->createMock(ilLanguage::class);
76 $this->dic_mock[
'ui.factory'] = $DIC[
'ui.factory'] = $this->createMock(\
ILIAS\
UI\Factory::class);
77 $this->dic_mock[
'ui.renderer'] = $DIC[
'ui.renderer'] = $this->createMock(\
ILIAS\
UI\Renderer::class);
78 $this->dic_mock[
'objDefinition'] = $DIC[
'objDefinition'] = $this->createMock(ilObjectDefinition::class);
91 $type_info =
$provider->provideTypeInformation();
92 $this->assertInstanceOf(TypeInformationCollection::class, $type_info);
95 $item_type_info = $type_info->get(TopParentItem::class);
96 $renderer = $item_type_info->getRenderer();
97 $this->assertInstanceOf(TopParentItemRenderer::class, $renderer);
98 $this->assertInstanceOf(
104 $item_type_info = $type_info->get(Link::class);
105 $renderer = $item_type_info->getRenderer();
106 $this->assertInstanceOf(ilMMLinkItemRenderer::class, $renderer);
107 $this->assertInstanceOf(
113 $item_type_info = $type_info->get(LinkList::class);
114 $renderer = $item_type_info->getRenderer();
115 $this->assertInstanceOf(LinkListItemRenderer::class, $renderer);
116 $this->assertInstanceOf(
122 $item_type_info = $type_info->get(Separator::class);
123 $renderer = $item_type_info->getRenderer();
124 $this->assertInstanceOf(SeparatorItemRenderer::class, $renderer);
125 $this->assertInstanceOf(
131 $this->dic_mock[
'ilObjDataCache'] = $this->createMock(ilObjectDataCache::class);
132 $this->dic_mock[
'static_url'] = $this->createMock(\
ILIAS\StaticURL\Services::class);
133 $item_type_info = $type_info->get(RepositoryLink::class);
134 $renderer = $item_type_info->getRenderer();
135 $this->assertInstanceOf(ilMMRepositoryLinkItemRenderer::class, $renderer);
145 $this->dic_mock[
'lng'] = $this->createMock(ilLanguage::class);
147 $items = $standard_top_items->getStaticTopItems();
148 $item_identifications = array_map(
153 $this->assertEquals(7, count($items));
154 $this->assertEquals(7, count($item_identifications));
156 $repo = $standard_top_items->getRepositoryIdentification();
157 $this->assertTrue(in_array($repo, $item_identifications));
159 $admin = $standard_top_items->getAdministrationIdentification();
160 $this->assertTrue(in_array($admin, $item_identifications));
162 $achievments = $standard_top_items->getAchievementsIdentification();
163 $this->assertTrue(in_array($achievments, $item_identifications));
165 $communication = $standard_top_items->getCommunicationIdentification();
166 $this->assertTrue(in_array($communication, $item_identifications));
168 $organisation = $standard_top_items->getOrganisationIdentification();
169 $this->assertTrue(in_array($communication, $item_identifications));
171 $personal = $standard_top_items->getPersonalWorkspaceIdentification();
172 $this->assertTrue(in_array($personal, $item_identifications));
Class ChatMainBarProvider .
Interface IdentificationInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class NullIdentification.
Customizing of pimple-DIC for ILIAS.
ILIAS DI Container $dic_backup
testTypeHandlers()
PhpArrayIndexImmediatelyRewrittenInspection
Class Link Attention: This is not the same as the .
Class CustomMainBarProvider.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class StandardTopItemsProvider.
getProviderIdentification()