◆ setUp()
ilSystemStyleSkinXMLTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 42 of file ilSystemStyleSkinXMLTest.php.
References $DIC, and ilSystemStyleSkinContainer\xCopy().
46 $this->save_dic =
$DIC;
48 $this->skin =
new ilSkinXML(
"skin1",
"skin 1");
51 $this->style1->setCssFile(
"style1css");
52 $this->style1->setImageDirectory(
"style1image");
53 $this->style1->setSoundDirectory(
"style1sound");
54 $this->style1->setFontDirectory(
"style1font");
57 $this->style2->setCssFile(
"style2css");
58 $this->style2->setImageDirectory(
"style2image");
59 $this->style2->setSoundDirectory(
"style2sound");
60 $this->style2->setFontDirectory(
"style2font");
64 mkdir($this->system_style_config->test_skin_temp_path);
ilSkinXml holds an manages the basic data of a skin as provide by the template of the skin...
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
static xCopy($src, $dest)
Recursive copy of a folder.
◆ tearDown()
ilSystemStyleSkinXMLTest::tearDown |
( |
| ) |
|
|
protected |
◆ testAddStyle()
ilSystemStyleSkinXMLTest::testAddStyle |
( |
| ) |
|
Definition at line 82 of file ilSystemStyleSkinXMLTest.php.
84 $this->assertEquals(count($this->skin), 0);
85 $this->assertEquals(count($this->skin->getStyles()), 0);
86 $this->skin->addStyle($this->style1);
87 $this->assertEquals(count($this->skin), 1);
88 $this->assertEquals(count($this->skin->getStyles()), 1);
89 $this->skin->addStyle($this->style1);
90 $this->assertEquals(count($this->skin), 2);
91 $this->assertEquals(count($this->skin->getStyles()), 2);
92 $this->skin->addStyle($this->style2);
93 $this->assertEquals(count($this->skin), 3);
94 $this->assertEquals(count($this->skin->getStyles()), 3);
◆ testAsXML()
ilSystemStyleSkinXMLTest::testAsXML |
( |
| ) |
|
Definition at line 134 of file ilSystemStyleSkinXMLTest.php.
136 $this->skin->addStyle($this->style1);
137 $this->skin->addStyle($this->style2);
138 $this->assertEquals($this->skin->asXML(), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
◆ testGetStyles()
ilSystemStyleSkinXMLTest::testGetStyles |
( |
| ) |
|
◆ testReadXML()
ilSystemStyleSkinXMLTest::testReadXML |
( |
| ) |
|
Definition at line 150 of file ilSystemStyleSkinXMLTest.php.
References $skin.
152 $skin = ilSkinXML::parseFromXML($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml");
153 $this->assertEquals(
$skin->asXML(), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
◆ testRemoveStyles()
ilSystemStyleSkinXMLTest::testRemoveStyles |
( |
| ) |
|
Definition at line 106 of file ilSystemStyleSkinXMLTest.php.
108 $this->skin->addStyle($this->style1);
109 $this->skin->addStyle($this->style2);
110 $this->assertEquals(count($this->skin), 2);
111 $this->skin->removeStyle(
"style1");
112 $this->assertEquals(count($this->skin), 1);
113 $this->skin->removeStyle(
"style2");
114 $this->assertEquals(count($this->skin), 0);
◆ testRemoveTestTwice()
ilSystemStyleSkinXMLTest::testRemoveTestTwice |
( |
| ) |
|
Definition at line 117 of file ilSystemStyleSkinXMLTest.php.
References Vendor\Package\$e, and ilSystemStyleException\INVALID_ID.
119 $this->skin->addStyle($this->style1);
120 $this->skin->addStyle($this->style2);
121 $this->assertEquals(count($this->skin), 2);
122 $this->skin->removeStyle(
"style1");
123 $this->assertEquals(count($this->skin), 1);
124 $this->skin->removeStyle(
"style2");
125 $this->assertEquals(count($this->skin), 0);
127 $this->skin->removeStyle(
"style2");
128 $this->assertTrue(
false);
Class for advanced editing exception handling in ILIAS.
◆ testSkinNameAndId()
ilSystemStyleSkinXMLTest::testSkinNameAndId |
( |
| ) |
|
Definition at line 76 of file ilSystemStyleSkinXMLTest.php.
78 $this->assertEquals(
"skin1", $this->skin->getId());
79 $this->assertEquals(
"skin 1", $this->skin->getName());
◆ testWriteXML()
ilSystemStyleSkinXMLTest::testWriteXML |
( |
| ) |
|
Definition at line 141 of file ilSystemStyleSkinXMLTest.php.
143 $this->skin->addStyle($this->style1);
144 $this->skin->addStyle($this->style2);
145 $this->skin->writeToXMLFile($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml");
146 $this->assertEquals(file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml"), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
147 unlink($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml");
◆ $save_dic
ilSystemStyleSkinXMLTest::$save_dic = null |
|
protected |
◆ $skin
ilSystemStyleSkinXMLTest::$skin |
|
protected |
◆ $style1
ilSystemStyleSkinXMLTest::$style1 = null |
|
protected |
◆ $style2
ilSystemStyleSkinXMLTest::$style2 = null |
|
protected |
◆ $system_style_config
ilSystemStyleSkinXMLTest::$system_style_config |
|
protected |
The documentation for this class was generated from the following file: