◆ setUp()
ilSystemStyleSkinXMLTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 40 of file ilSystemStyleSkinXMLTest.php.
References $DIC, and ilSystemStyleSkinContainer\xCopy().
44 $this->save_dic =
$DIC;
46 $this->skin =
new ilSkinXML(
"skin1",
"skin 1");
49 $this->style1->setCssFile(
"style1css");
50 $this->style1->setImageDirectory(
"style1image");
51 $this->style1->setSoundDirectory(
"style1sound");
52 $this->style1->setFontDirectory(
"style1font");
55 $this->style2->setCssFile(
"style2css");
56 $this->style2->setImageDirectory(
"style2image");
57 $this->style2->setSoundDirectory(
"style2sound");
58 $this->style2->setFontDirectory(
"style2font");
62 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 80 of file ilSystemStyleSkinXMLTest.php.
82 $this->assertEquals(count($this->skin), 0);
83 $this->assertEquals(count($this->skin->getStyles()), 0);
84 $this->skin->addStyle($this->style1);
85 $this->assertEquals(count($this->skin), 1);
86 $this->assertEquals(count($this->skin->getStyles()), 1);
87 $this->skin->addStyle($this->style1);
88 $this->assertEquals(count($this->skin), 2);
89 $this->assertEquals(count($this->skin->getStyles()), 2);
90 $this->skin->addStyle($this->style2);
91 $this->assertEquals(count($this->skin), 3);
92 $this->assertEquals(count($this->skin->getStyles()), 3);
◆ testAsXML()
ilSystemStyleSkinXMLTest::testAsXML |
( |
| ) |
|
Definition at line 132 of file ilSystemStyleSkinXMLTest.php.
134 $this->skin->addStyle($this->style1);
135 $this->skin->addStyle($this->style2);
136 $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 148 of file ilSystemStyleSkinXMLTest.php.
References $skin.
150 $skin = ilSkinXML::parseFromXML($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml");
151 $this->assertEquals(
$skin->asXML(), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
◆ testRemoveStyles()
ilSystemStyleSkinXMLTest::testRemoveStyles |
( |
| ) |
|
Definition at line 104 of file ilSystemStyleSkinXMLTest.php.
106 $this->skin->addStyle($this->style1);
107 $this->skin->addStyle($this->style2);
108 $this->assertEquals(count($this->skin), 2);
109 $this->skin->removeStyle(
"style1");
110 $this->assertEquals(count($this->skin), 1);
111 $this->skin->removeStyle(
"style2");
112 $this->assertEquals(count($this->skin), 0);
◆ testRemoveTestTwice()
ilSystemStyleSkinXMLTest::testRemoveTestTwice |
( |
| ) |
|
Definition at line 115 of file ilSystemStyleSkinXMLTest.php.
References ilSystemStyleException\INVALID_ID.
117 $this->skin->addStyle($this->style1);
118 $this->skin->addStyle($this->style2);
119 $this->assertEquals(count($this->skin), 2);
120 $this->skin->removeStyle(
"style1");
121 $this->assertEquals(count($this->skin), 1);
122 $this->skin->removeStyle(
"style2");
123 $this->assertEquals(count($this->skin), 0);
125 $this->skin->removeStyle(
"style2");
126 $this->assertTrue(
false);
Class for advanced editing exception handling in ILIAS.
◆ testSkinNameAndId()
ilSystemStyleSkinXMLTest::testSkinNameAndId |
( |
| ) |
|
Definition at line 74 of file ilSystemStyleSkinXMLTest.php.
76 $this->assertEquals(
"skin1", $this->skin->getId());
77 $this->assertEquals(
"skin 1", $this->skin->getName());
◆ testWriteXML()
ilSystemStyleSkinXMLTest::testWriteXML |
( |
| ) |
|
Definition at line 139 of file ilSystemStyleSkinXMLTest.php.
141 $this->skin->addStyle($this->style1);
142 $this->skin->addStyle($this->style2);
143 $this->skin->writeToXMLFile($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml");
144 $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"));
145 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: