ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSystemStyleOverviewGUITest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once('vendor/composer/vendor/autoload.php');
22include_once('./components/ILIAS/UI/tests/UITestHelper.php');
23
25use ILIAS\Data\Factory as DataFactory;
26use ILIAS\Refinery\Factory as Refinery;
29
31{
33
34 protected ilCtrl $ctrl;
35
36 protected function setUp(): void
37 {
38 parent::setUp();
39 $ui_helper = new UITestHelper();
40
41 $this->ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->onlyMethods([
42 'getFormAction',
43 'getCmd'
44 ])->getMock();
45
46 $lng = new ilLanguageMock();
47 $tpl = $ui_helper->mainTemplate();
48 $ui_factory = $ui_helper->factory();
49 $renderer = $ui_helper->renderer();
50 $request = $this->getMockBuilder(WrapperFactory::class)->disableOriginalConstructor()->onlyMethods([
51 ])->getMock();
52
53 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
54 $tabs = $this->getMockBuilder(ilTabsGUI::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
55 $data_factory = new DataFactory();
56 $refinery = new Refinery($data_factory, $lng);
57
58 $factory = new ilSkinFactory($this->lng, $this->system_style_config);
59 $help = $this->getMockBuilder(ilHelpGUI::class)->disableOriginalConstructor()->onlyMethods([
60 ])->getMock();
61 $upload = $this->getMockBuilder(FileUpload::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
62
63 $this->overview_gui = new ilSystemStyleOverviewGUI(
64 $this->ctrl,
65 $lng,
66 $tpl,
67 $ui_factory,
69 $request,
70 $toolbar,
72 $factory,
73 $upload,
74 $tabs,
75 $help,
76 $this->container->getSkin()->getId(),
77 $this->style->getId(),
78 '1',
79 false,
80 true
81 );
82 }
83
84 public function testConstruct(): void
85 {
86 $this->assertInstanceOf(ilSystemStyleOverviewGUI::class, $this->overview_gui);
87 }
88}
trait UITestHelper
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...
$renderer
Builds data types.
Definition: Factory.php:36
Class ilCtrl provides processing control methods.
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...