ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSystemStyleOverviewGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once('vendor/composer/vendor/autoload.php');
22 include_once('./components/ILIAS/UI/tests/UITestHelper.php');
23 
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,
68  $renderer,
69  $request,
70  $toolbar,
71  $refinery,
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 }
$renderer
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait UITestHelper
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...