ILIAS  release_8 Revision v8.24
ilSystemStyleIconsGUITest Class Reference
+ Inheritance diagram for ilSystemStyleIconsGUITest:
+ Collaboration diagram for ilSystemStyleIconsGUITest:

Public Member Functions

 testConstruct ()
 
 tesGetIconsPreviewstPreview ()
 
 testPreview ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilSystemStyleBaseFSTest
 setUp ()
 
 tearDown ()
 

Protected Attributes

ilSystemStyleIconsGUI $icons_gui
 
ilCtrl $ctrl
 
- Protected Attributes inherited from ilSystemStyleBaseFSTest
ilSystemStyleConfigMock $system_style_config
 
ilSkinStyleContainer $container
 
ilSkinStyle $style
 
ilFileSystemHelper $file_system
 
ILIAS DI Container $save_dic = null
 
ilLanguage $lng
 
ilSystemStyleMessageStack $message_stack
 

Detailed Description

Definition at line 29 of file ilSystemStyleIconsGUITest.php.

Member Function Documentation

◆ setUp()

ilSystemStyleIconsGUITest::setUp ( )
protected

Reimplemented from ilSystemStyleBaseFSTest.

Definition at line 35 of file ilSystemStyleIconsGUITest.php.

35 : void
36 {
37 parent::setUp();
38 $ui_helper = new UITestHelper();
39
40 $this->ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->onlyMethods([
41 'getFormAction','getCmd','getLinkTargetByClass'
42 ])->getMock();
43
44 $tpl = $ui_helper->mainTemplate();
45 $ui_factory = $ui_helper->factory();
46 $renderer = $ui_helper->renderer();
47 $request = $this->getMockBuilder(WrapperFactory::class)->disableOriginalConstructor()->onlyMethods([
48 ])->getMock();
49
50 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
51 $upload = $this->getMockBuilder(FileUpload::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
52 $tabs = $this->getMockBuilder(ilTabsGUI::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
53 $data_factory = new DataFactory();
54 $refinery = new Refinery($data_factory, $this->lng);
55
56 $factory = new ilSkinFactory($this->lng, $this->system_style_config);
57
58 $this->icons_gui = new ilSystemStyleIconsGUI(
59 $this->ctrl,
60 $this->lng,
61 $tpl,
62 $ui_factory,
63 $renderer,
64 $request,
65 $toolbar,
68 $tabs,
69 $upload,
70 $this->container->getSkin()->getId(),
71 $this->style->getId()
72 );
73 }
Class UITestHelper can be helpful for test cases outside the UI Components, to inject a working facto...
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
@ilCtrl_Calls ilSystemStyleIconsGUI:
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
$factory
Definition: metadata.php:75
Refinery Factory $refinery

References $factory, ILIAS\Repository\$refinery, $tpl, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ tesGetIconsPreviewstPreview()

ilSystemStyleIconsGUITest::tesGetIconsPreviewstPreview ( )

Definition at line 81 of file ilSystemStyleIconsGUITest.php.

81 : void
82 {
83 $this->assertInstanceOf(\ILIAS\UI\Component\Panel\Report::class, $this->icons_gui->getIconsPreviews());
84 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.

◆ testConstruct()

ilSystemStyleIconsGUITest::testConstruct ( )

Definition at line 75 of file ilSystemStyleIconsGUITest.php.

75 : void
76 {
77 $this->ctrl->method('getCmd')->willReturn('');
78 $this->assertInstanceOf(ilSystemStyleIconsGUI::class, $this->icons_gui);
79 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ testPreview()

ilSystemStyleIconsGUITest::testPreview ( )

Definition at line 87 of file ilSystemStyleIconsGUITest.php.

87 : void
88 {
89 $this->ctrl->method('getCmd')->willReturn('preview');
90 $this->icons_gui->executeCommand();
91 $this->assertTrue(true);
92 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSystemStyleIconsGUITest::$ctrl
protected

Definition at line 33 of file ilSystemStyleIconsGUITest.php.

◆ $icons_gui

ilSystemStyleIconsGUI ilSystemStyleIconsGUITest::$icons_gui
protected

Definition at line 31 of file ilSystemStyleIconsGUITest.php.


The documentation for this class was generated from the following file: