19declare(strict_types=1);
21require_once(
'vendor/composer/vendor/autoload.php');
22include_once(
'./components/ILIAS/UI/tests/UITestHelper.php');
24use PHPUnit\Framework\TestCase;
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());
trait UITestHelper
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...
Customizing of pimple-DIC for ILIAS.
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...
The Collection of all available Contexts in the System.
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable.
Stores Information of UI Components parsed from YAML, examples and less files.
Responsible for loading the HTTP Service into the dependency injection container of ILIAS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.