ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilSystemStyleLessGUITest Class Reference
+ Inheritance diagram for ilSystemStyleLessGUITest:
+ Collaboration diagram for ilSystemStyleLessGUITest:

Public Member Functions

 testConstruct ()
 
 testInitSystemStyleLessForm ()
 

Protected Member Functions

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

Protected Attributes

ilSystemStyleLessGUI $less_gui
 
- 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 31 of file ilSystemStyleLessGUITest.php.

Member Function Documentation

◆ setUp()

ilSystemStyleLessGUITest::setUp ( )
protected

Reimplemented from ilSystemStyleBaseFSTest.

Definition at line 35 of file ilSystemStyleLessGUITest.php.

35 : void
36 {
37 parent::setUp();
38 $ui_helper = new UITestHelper();
39
40 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->onlyMethods([
41 'getFormAction'
42 ])->getMock();
43 $lng = new ilLanguageMock();
44 $tpl = $ui_helper->mainTemplate();
45 $ui_factory = $ui_helper->factory();
46 $renderer = $ui_helper->renderer();
47 $request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->onlyMethods([
48 ])->getMock();
49
50 $toolbar = $this->getMockBuilder(ilToolbarGUI::class)->disableOriginalConstructor()->onlyMethods([])->getMock();
51 $data_factory = new DataFactory();
52 $refinery = new Refinery($data_factory, $lng);
53
54 $factory = new ilSkinFactory($this->lng, $this->system_style_config);
55
56 $this->less_gui = new ilSystemStyleLessGUI(
57 $ctrl,
58 $lng,
59 $tpl,
60 $ui_factory,
61 $renderer,
62 $request,
63 $toolbar,
66 $this->container->getSkin()->getId(),
67 $this->style->getId()
68 );
69 }
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...
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, ilSystemStyleBaseFSTest\$lng, ILIAS\Repository\$refinery, $tpl, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ testConstruct()

ilSystemStyleLessGUITest::testConstruct ( )

Definition at line 71 of file ilSystemStyleLessGUITest.php.

71 : void
72 {
73 $this->assertInstanceOf(ilSystemStyleLessGUI::class, $this->less_gui);
74 }

◆ testInitSystemStyleLessForm()

ilSystemStyleLessGUITest::testInitSystemStyleLessForm ( )

Definition at line 76 of file ilSystemStyleLessGUITest.php.

76 : void
77 {
78 $form = $this->less_gui->initSystemStyleLessForm();
79
80 $this->assertInstanceOf(Form::class, $form);
81 $this->assertCount(1, $form->getInputs());
82 $this->assertInstanceOf(Section::class, $form->getInputs()[0]);
83 $this->assertCount(2, $form->getInputs()[0]->getInputs());
84 $this->assertInstanceOf(Section::class, $form->getInputs()[0]->getInputs()[0]);
85 $this->assertCount(3, $form->getInputs()[0]->getInputs()[0]->getInputs());
86 $this->assertInstanceOf(Text::class, $form->getInputs()[0]->getInputs()[0]->getInputs()[0]);
87 }

Field Documentation

◆ $less_gui

ilSystemStyleLessGUI ilSystemStyleLessGUITest::$less_gui
protected

Definition at line 33 of file ilSystemStyleLessGUITest.php.


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