ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSkinFactoryTest Class Reference
+ Inheritance diagram for ilSkinFactoryTest:
+ Collaboration diagram for ilSkinFactoryTest:

Public Member Functions

 testSkinFromXML ()
 
 testSkinStyleContainerFromId ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilSystemStyleBaseFS
 setUp ()
 
 getAllContentOfFolder (string $directory)
 

Protected Attributes

ilSkin $skin
 
ilSkinStyle $style1
 
ilSkinStyle $style2
 
ilSkinFactory $factory
 
- Protected Attributes inherited from ilSystemStyleBaseFS
ilSystemStyleConfigMock $system_style_config
 
ilSkinStyleContainer $container
 
ilSkinStyle $style
 
ILIAS DI Container $save_dic = null
 
Language $lng
 
ilSystemStyleMessageStack $message_stack
 

Detailed Description

Definition at line 23 of file ilSkinFactoryTest.php.

Member Function Documentation

◆ setUp()

ilSkinFactoryTest::setUp ( )
protected

Definition at line 30 of file ilSkinFactoryTest.php.

References $DIC, factory(), and ILIAS\Repository\lng().

30  : void
31  {
32  parent::setUp();
33 
34  $this->skin = new ilSkin('skin1', 'skin 1');
35 
36  $this->style1 = new ilSkinStyle('style1', 'Style 1');
37  $this->style1->setCssFile('style1');
38  $this->style1->setImageDirectory('style1image');
39  $this->style1->setSoundDirectory('style1sound');
40  $this->style1->setFontDirectory('style1font');
41 
42  $this->style2 = new ilSkinStyle('style2', 'Style 2');
43  $this->style2->setCssFile('style2');
44  $this->style2->setImageDirectory('style2image');
45  $this->style2->setSoundDirectory('style2sound');
46  $this->style2->setFontDirectory('style2font');
47 
48  $this->factory = new ilSkinFactory($this->lng, $this->system_style_config);
49 
50  global $DIC;
51 
52  $DIC = new ilSystemStyleDICMock();
53  $DIC['tpl'] = $this->getMockBuilder(ilGlobalTemplateInterface::class)->getMock();
54  }
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
factory()
global $DIC
Definition: shib_login.php:22
ilSkin holds an manages the basic data of a skin as provide by the template of the skin...
+ Here is the call graph for this function:

◆ testSkinFromXML()

ilSkinFactoryTest::testSkinFromXML ( )

Definition at line 56 of file ilSkinFactoryTest.php.

References ilSkin\asXML(), and ILIAS\Repository\lng().

56  : void
57  {
58  $factory = new ilSkinFactory($this->lng);
59  $skin = $factory->skinFromXML($this->system_style_config->getCustomizingSkinPath() . 'skin1/template.xml');
60  $this->assertEquals(
61  $skin->asXML(),
62  file_get_contents($this->system_style_config->getCustomizingSkinPath() . 'skin1/template.xml')
63  );
64  }
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
asXML()
Stores the skin and all it's styles as xml.
ilSkinFactory $factory
+ Here is the call graph for this function:

◆ testSkinStyleContainerFromId()

ilSkinFactoryTest::testSkinStyleContainerFromId ( )

Definition at line 66 of file ilSkinFactoryTest.php.

References ilSystemStyleBaseFS\$container, ilSystemStyleBaseFS\$message_stack, factory(), and ilSkinStyleContainer\getSkin().

66  : void
67  {
68  $container = $this->factory->skinStyleContainerFromId($this->skin->getId(), $this->message_stack);
69  $this->assertEquals($container->getSkin()->getId(), $this->skin->getId());
70  $this->assertEquals($container->getSkin()->getName(), $this->skin->getName());
71 
72  $this->assertEquals($container->getSkin()->getStyle($this->style1->getId()), $this->style1);
73  $this->assertEquals($container->getSkin()->getStyle($this->style2->getId()), $this->style2);
74  }
factory()
ilSystemStyleMessageStack $message_stack
ilSkinStyleContainer $container
+ Here is the call graph for this function:

Field Documentation

◆ $factory

ilSkinFactory ilSkinFactoryTest::$factory
protected

Definition at line 28 of file ilSkinFactoryTest.php.

◆ $skin

ilSkin ilSkinFactoryTest::$skin
protected

Definition at line 25 of file ilSkinFactoryTest.php.

◆ $style1

ilSkinStyle ilSkinFactoryTest::$style1
protected

Definition at line 26 of file ilSkinFactoryTest.php.

◆ $style2

ilSkinStyle ilSkinFactoryTest::$style2
protected

Definition at line 27 of file ilSkinFactoryTest.php.


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