19 declare(strict_types=1);
21 require_once(
'libs/composer/vendor/autoload.php');
22 include_once(
'./tests/UI/UITestHelper.php');
47 protected function setUp(): void
54 $this->dic[
'ilCtrl'] = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->onlyMethods([
55 'getLinkTargetByClass' 57 $this->dic[
'ilCtrl']->method(
'getLinkTargetByClass')->willReturn(
'1');
61 $this->dic[
'global_screen'] = $this
62 ->getMockBuilder(
ILIAS\GlobalScreen\Services::class)
63 ->disableOriginalConstructor()
64 ->onlyMethods([
'identification'])
66 $provider_factory = $this->getMockBuilder(ProviderFactory::class)->getMock();
68 $this->dic[
'global_screen']->method(
'identification')->willReturn($identification);
73 if (!defined(
'ILIAS_HTTP_PATH')) {
74 define(
'ILIAS_HTTP_PATH',
'http://localhost');
80 $this->assertInstanceOf(
'SystemStylesGlobalScreenToolProvider', $this->tool_provider);
87 $this->tool_provider->isInterestedInContexts()->getStackAsArray()
94 $this->assertEquals([], $this->tool_provider->getToolsForContextStack($contexts));
100 $this->assertEquals([], $this->tool_provider->getToolsForContextStack($contexts));
107 $contexts->push($tree_available_context);
108 $tools = $this->tool_provider->getToolsForContextStack($contexts);
109 $this->assertCount(1, $tools);
110 $tool = array_pop($tools);
111 $this->assertInstanceOf(Tool::class, $tool);
112 $this->assertEquals(
'documentation', $tool->getTitle());
Class ChatMainBarProvider .
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable...
Customizing of pimple-DIC for ILIAS.
Class ContextRepository The Collection of all available Contexts in the System.
Stores Information of UI Components parsed from YAML, examples and less files.
Class BasicScreenContext.
The scope of this class is split ilias-conform URI's into components.
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...