◆ setUp()
Definition at line 40 of file ilSkinXMLTest.php.
References ilSystemStyleSkinContainer\xCopy().
42 $this->skin =
new ilSkinXML(
"skin1",
"skin 1");
45 $this->style1->setCssFile(
"style1css");
46 $this->style1->setImageDirectory(
"style1image");
47 $this->style1->setSoundDirectory(
"style1sound");
48 $this->style1->setFontDirectory(
"style1font");
51 $this->style2->setCssFile(
"style2css");
52 $this->style2->setImageDirectory(
"style2image");
53 $this->style2->setSoundDirectory(
"style2sound");
54 $this->style2->setFontDirectory(
"style2font");
58 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()
ilSkinXMLTest::tearDown |
( |
| ) |
|
|
protected |
◆ testAddStyle()
ilSkinXMLTest::testAddStyle |
( |
| ) |
|
Definition at line 73 of file ilSkinXMLTest.php.
75 $this->assertEquals(count($this->skin), 0);
76 $this->assertEquals(count($this->skin->getStyles()), 0);
77 $this->skin->addStyle($this->style1);
78 $this->assertEquals(count($this->skin), 1);
79 $this->assertEquals(count($this->skin->getStyles()), 1);
80 $this->skin->addStyle($this->style1);
81 $this->assertEquals(count($this->skin), 2);
82 $this->assertEquals(count($this->skin->getStyles()), 2);
83 $this->skin->addStyle($this->style2);
84 $this->assertEquals(count($this->skin), 3);
85 $this->assertEquals(count($this->skin->getStyles()), 3);
◆ testAsXML()
ilSkinXMLTest::testAsXML |
( |
| ) |
|
Definition at line 125 of file ilSkinXMLTest.php.
127 $this->skin->addStyle($this->style1);
128 $this->skin->addStyle($this->style2);
129 $this->assertEquals($this->skin->asXML(), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
◆ testGetStyles()
ilSkinXMLTest::testGetStyles |
( |
| ) |
|
Definition at line 88 of file ilSkinXMLTest.php.
References $style1, and $style2.
90 $this->skin->addStyle($this->style1);
91 $this->skin->addStyle($this->style2);
93 $this->assertNotEquals($this->skin->getStyle(
"style2"),
$this->style1);
94 $this->assertEquals($this->skin->getStyle(
"style2"),
$this->style2);
◆ testReadXML()
ilSkinXMLTest::testReadXML |
( |
| ) |
|
Definition at line 141 of file ilSkinXMLTest.php.
References $skin.
143 $skin = ilSkinXML::parseFromXML($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml");
144 $this->assertEquals(
$skin->asXML(), file_get_contents($this->system_style_config->getCustomizingSkinPath() .
"skin1/template.xml"));
◆ testRemoveStyles()
ilSkinXMLTest::testRemoveStyles |
( |
| ) |
|
Definition at line 97 of file ilSkinXMLTest.php.
99 $this->skin->addStyle($this->style1);
100 $this->skin->addStyle($this->style2);
101 $this->assertEquals(count($this->skin), 2);
102 $this->skin->removeStyle(
"style1");
103 $this->assertEquals(count($this->skin), 1);
104 $this->skin->removeStyle(
"style2");
105 $this->assertEquals(count($this->skin), 0);
◆ testRemoveTestTwice()
ilSkinXMLTest::testRemoveTestTwice |
( |
| ) |
|
Definition at line 108 of file ilSkinXMLTest.php.
References Vendor\Package\$e, and ilSystemStyleException\INVALID_ID.
110 $this->skin->addStyle($this->style1);
111 $this->skin->addStyle($this->style2);
112 $this->assertEquals(count($this->skin), 2);
113 $this->skin->removeStyle(
"style1");
114 $this->assertEquals(count($this->skin), 1);
115 $this->skin->removeStyle(
"style2");
116 $this->assertEquals(count($this->skin), 0);
118 $this->skin->removeStyle(
"style2");
119 $this->assertTrue(
false);
Class for advanced editing exception handling in ILIAS.
◆ testSkinNameAndId()
ilSkinXMLTest::testSkinNameAndId |
( |
| ) |
|
Definition at line 67 of file ilSkinXMLTest.php.
69 $this->assertEquals(
"skin1", $this->skin->getId());
70 $this->assertEquals(
"skin 1", $this->skin->getName());
◆ testWriteXML()
ilSkinXMLTest::testWriteXML |
( |
| ) |
|
Definition at line 132 of file ilSkinXMLTest.php.
134 $this->skin->addStyle($this->style1);
135 $this->skin->addStyle($this->style2);
136 $this->skin->writeToXMLFile($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml");
137 $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"));
138 unlink($this->system_style_config->getCustomizingSkinPath() .
"skin1/template-copy.xml");
◆ $skin
◆ $style1
ilSkinXMLTest::$style1 = null |
|
protected |
◆ $style2
ilSkinXMLTest::$style2 = null |
|
protected |
◆ $system_style_config
ilSkinXMLTest::$system_style_config |
|
protected |
The documentation for this class was generated from the following file: