◆ testConstruct()
ilSystemStyleIconFolderTest::testConstruct |
( |
| ) |
|
Definition at line 28 of file ilSystemStyleIconFolderTest.php.
32 $this->assertEquals($this->container->getImagesSkinPath($this->style->getId()), $folder->getPath());
Abstracts a folder containing a set of icons.
◆ testExtractChangeColors()
ilSystemStyleIconFolderTest::testExtractChangeColors |
( |
| ) |
|
Definition at line 168 of file ilSystemStyleIconFolderTest.php.
171 $folder1->changeIconColors([
'505050' =>
'555555']);
184 $expected_color_set->addColor($color2);
185 $expected_color_set->addColor($color3);
186 $expected_color_set->addColor($color4);
187 $expected_color_set->addColor($color5);
188 $expected_color_set->addColor($color6);
189 $expected_color_set->addColor($color1);
190 $expected_color_set->addColor($color7);
192 $this->assertEquals($expected_color_set, $folder2->getColorSet());
Abstracts a folder containing a set of icons.
◆ testExtractColorset()
ilSystemStyleIconFolderTest::testExtractColorset |
( |
| ) |
|
Definition at line 144 of file ilSystemStyleIconFolderTest.php.
157 $expected_color_set->addColor($color1);
158 $expected_color_set->addColor($color2);
159 $expected_color_set->addColor($color3);
160 $expected_color_set->addColor($color4);
161 $expected_color_set->addColor($color5);
162 $expected_color_set->addColor($color6);
163 $expected_color_set->addColor($color7);
165 $this->assertEquals($expected_color_set, $folder->getColorSet());
Abstracts a folder containing a set of icons.
◆ testFolderDoesNotExist()
ilSystemStyleIconFolderTest::testFolderDoesNotExist |
( |
| ) |
|
◆ testFolderGetIconByName()
ilSystemStyleIconFolderTest::testFolderGetIconByName |
( |
| ) |
|
Definition at line 59 of file ilSystemStyleIconFolderTest.php.
61 $style_path = $this->container->getImagesSkinPath($this->style->getId());
63 $path1 = $style_path .
'/test_image_1.svg';
66 $this->assertEquals($icon1, $folder->getIconByName(
'test_image_1.svg'));
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testFolderGetIconByPath()
ilSystemStyleIconFolderTest::testFolderGetIconByPath |
( |
| ) |
|
Definition at line 69 of file ilSystemStyleIconFolderTest.php.
71 $style_path = $this->container->getImagesSkinPath($this->style->getId());
73 $path1 = $style_path .
'/test_image_1.svg';
76 $this->assertEquals($icon1, $folder->getIconByPath($path1));
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testGetUsages()
ilSystemStyleIconFolderTest::testGetUsages |
( |
| ) |
|
Definition at line 195 of file ilSystemStyleIconFolderTest.php.
197 $style_path = $this->container->getImagesSkinPath($this->style->getId());
201 $path1 = $style_path .
'/test_image_1.svg';
203 $icon1->getColorSet();
205 $path2 = $style_path .
'/image_subfolder/sub_test_image_1.svg';
207 $icon2->getColorSet();
209 $path3 = $style_path .
'/image_subfolder/sub_test_image_2.svg';
211 $icon3->getColorSet();
213 $expected_icons_usages = [$icon2, $icon3, $icon1];
215 $this->assertEquals($expected_icons_usages, $folder1->getUsagesOfColor(
'id_6B6B6B'));
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testGetUsagesAfterChangeColor()
ilSystemStyleIconFolderTest::testGetUsagesAfterChangeColor |
( |
| ) |
|
Definition at line 218 of file ilSystemStyleIconFolderTest.php.
220 $style_path = $this->container->getImagesSkinPath($this->style->getId());
223 $folder1->changeIconColors([
'6B6B6B' =>
'7B6B6B']);
227 $path1 = $style_path .
'/test_image_1.svg';
229 $icon1->getColorSet();
231 $path2 = $style_path .
'/image_subfolder/sub_test_image_1.svg';
233 $icon2->getColorSet();
235 $path3 = $style_path .
'/image_subfolder/sub_test_image_2.svg';
237 $icon3->getColorSet();
239 $expected_icons_usages = [$icon2, $icon3, $icon1];
241 $this->assertEquals($expected_icons_usages, $folder2->getUsagesOfColor(
'id_7B6B6B'));
242 $this->assertEquals([], $folder2->getUsagesOfColor(
'id_6B6B6B'));
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testGetUsagesAsString()
ilSystemStyleIconFolderTest::testGetUsagesAsString |
( |
| ) |
|
Definition at line 245 of file ilSystemStyleIconFolderTest.php.
250 'sub_test_image_1; sub_test_image_2; test_image_1; ',
251 $folder1->getUsagesOfColorAsString(
'id_6B6B6B')
Abstracts a folder containing a set of icons.
◆ testIconDoesNotExist()
ilSystemStyleIconFolderTest::testIconDoesNotExist |
( |
| ) |
|
◆ testReadRecursiveAndSortByFolder()
ilSystemStyleIconFolderTest::testReadRecursiveAndSortByFolder |
( |
| ) |
|
Definition at line 116 of file ilSystemStyleIconFolderTest.php.
118 $style_path = $this->container->getImagesSkinPath($this->style->getId());
120 $path1 = $style_path .
'/test_image_1.svg';
123 $path2 = $style_path .
'/image_subfolder/sub_test_image_1.svg';
126 $path3 = $style_path .
'/image_subfolder/sub_test_image_2.svg';
129 $path4 = $style_path .
'/nonsvg.png';
132 $path5 = $style_path .
'/icon_accs.svg';
136 $style_path => [$icon5, $icon1, $icon4],
137 $style_path .
'/image_subfolder' => [$icon2, $icon3],
141 $this->assertEquals($expected_icons, $folder->getIconsSortedByFolder());
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testReadRecursiveAndSortByName()
ilSystemStyleIconFolderTest::testReadRecursiveAndSortByName |
( |
| ) |
|
Definition at line 91 of file ilSystemStyleIconFolderTest.php.
93 $style_path = $this->container->getImagesSkinPath($this->style->getId());
95 $path1 = $style_path .
'/test_image_1.svg';
98 $path2 = $style_path .
'/image_subfolder/sub_test_image_1.svg';
101 $path3 = $style_path .
'/image_subfolder/sub_test_image_2.svg';
104 $path4 = $style_path .
'/nonsvg.png';
107 $path5 = $style_path .
'/icon_accs.svg';
110 $expected_icons = [$icon5, $icon2, $icon3, $icon1, $icon4];
113 $this->assertEquals($expected_icons, $folder->getIcons());
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
Abstracts a folder containing a set of icons.
◆ testReadRecursiveCount()
ilSystemStyleIconFolderTest::testReadRecursiveCount |
( |
| ) |
|
◆ testSetPath()
ilSystemStyleIconFolderTest::testSetPath |
( |
| ) |
|
Definition at line 35 of file ilSystemStyleIconFolderTest.php.
38 $folder->setPath(
'pathnew');
40 $this->assertEquals(
'pathnew', $folder->getPath());
Abstracts a folder containing a set of icons.
◆ $icon_name
string ilSystemStyleIconFolderTest::$icon_name = 'test_image_1.svg' |
|
protected |
◆ $icon_type
string ilSystemStyleIconFolderTest::$icon_type = 'svg' |
|
protected |
The documentation for this class was generated from the following file: