◆ setUp()
ilSystemStyleIconTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 49 of file ilSystemStyleIconTest.php.
49 : void
50 {
52
53 $this->save_dic =
$DIC;
54
56
58
59 mkdir($this->system_style_config->test_skin_temp_path);
61
63 $this->style = $this->container->getSkin()->getStyle("style1");
64 }
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
static generateFromId($skin_id, ilSystemStyleMessageStack $message_stack=null, ilSystemStyleConfig $system_styles_conf=null)
Generate the container class by parsing the corresponding XML.
static xCopy($src, $dest)
Recursive copy of a folder.
References $DIC, ilSystemStyleSkinContainer\generateFromId(), and ilSystemStyleSkinContainer\xCopy().
◆ tearDown()
ilSystemStyleIconTest::tearDown |
( |
| ) |
|
|
protected |
◆ testChangeColor()
ilSystemStyleIconTest::testChangeColor |
( |
| ) |
|
Definition at line 116 of file ilSystemStyleIconTest.php.
117 {
118 $path = $this->container->getImagesSkinPath($this->style->getId()) .
"/" .
$this->icon_name;
120
121 $icon->changeColors(['505050' => '555555']);
122
128 $expected_color_set->addColor($color1);
129 $expected_color_set->addColor($color2);
130 $expected_color_set->addColor($color3);
131 $expected_color_set->addColor($color4);
132
133 $this->assertEquals($expected_color_set, $icon->getColorSet());
134 }
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon.
References $icon_name.
◆ testChangeColorInIconFile()
ilSystemStyleIconTest::testChangeColorInIconFile |
( |
| ) |
|
Definition at line 136 of file ilSystemStyleIconTest.php.
137 {
138 $path = $this->container->getImagesSkinPath($this->style->getId()) .
"/" .
$this->icon_name;
140
141 $icon->changeColors(['505050' => '555555']);
142
148 $expected_color_set->addColor($color1);
149 $expected_color_set->addColor($color2);
150 $expected_color_set->addColor($color3);
151 $expected_color_set->addColor($color4);
152
154
155 $this->assertEquals($expected_color_set, $icon_new->getColorSet());
156 }
References $icon_name.
◆ testConstruct()
ilSystemStyleIconTest::testConstruct |
( |
| ) |
|
Definition at line 73 of file ilSystemStyleIconTest.php.
74 {
75 $path = $this->container->getImagesSkinPath($this->style->getId()) .
"/" .
$this->icon_name;
77
78 $this->assertEquals($icon->getName(), $this->icon_name);
79 $this->assertEquals($icon->getPath(), $path);
80 $this->assertEquals($icon->getType(), $this->icon_type);
81 }
References $icon_name.
◆ testGetColorSet()
ilSystemStyleIconTest::testGetColorSet |
( |
| ) |
|
Definition at line 98 of file ilSystemStyleIconTest.php.
99 {
100 $path = $this->container->getImagesSkinPath($this->style->getId()) .
"/" .
$this->icon_name;
102
108 $expected_color_set->addColor($color1);
109 $expected_color_set->addColor($color2);
110 $expected_color_set->addColor($color3);
111 $expected_color_set->addColor($color4);
112
113 $this->assertEquals($expected_color_set, $icon->getColorSet());
114 }
References $icon_name.
◆ testGetDirRelToCustomizing()
ilSystemStyleIconTest::testGetDirRelToCustomizing |
( |
| ) |
|
Definition at line 83 of file ilSystemStyleIconTest.php.
84 {
85 $path = $this->container->getImagesSkinPath($this->style->getId()) .
"/" .
$this->icon_name;
87
88 $this->assertEquals($icon->getDirRelToCustomizing(), "");
89
91 $rel_path = "global/skin/unibe50/images";
92 $path =
"./Customizing" . $rel_path .
"/" .
$name;
94
95 $this->assertEquals($icon->getDirRelToCustomizing(), $rel_path);
96 }
References $icon_name, and $name.
◆ $container
ilSystemStyleIconTest::$container |
|
protected |
◆ $icon_name
ilSystemStyleIconTest::$icon_name = "test_image_1.svg" |
|
protected |
◆ $icon_type
ilSystemStyleIconTest::$icon_type = "svg" |
|
protected |
◆ $save_dic
ilSystemStyleIconTest::$save_dic = null |
|
protected |
◆ $style
ilSystemStyleIconTest::$style |
|
protected |
◆ $system_style_config
ilSystemStyleIconTest::$system_style_config |
|
protected |
The documentation for this class was generated from the following file: