◆ setUp()
ilSystemStyleSkinXMLTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 39 of file ilSystemStyleSkinXMLTest.php.
References $DIC, and ilSystemStyleSkinContainer\xCopy().
42 $this->save_dic =
$DIC;
44 $this->skin =
new ilSkinXML(
"skin1",
"skin 1");
47 $this->style1->setCssFile(
"style1css");
48 $this->style1->setImageDirectory(
"style1image");
49 $this->style1->setSoundDirectory(
"style1sound");
50 $this->style1->setFontDirectory(
"style1font");
53 $this->style2->setCssFile(
"style2css");
54 $this->style2->setImageDirectory(
"style2image");
55 $this->style2->setSoundDirectory(
"style2sound");
56 $this->style2->setFontDirectory(
"style2font");
60 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 77 of file ilSystemStyleSkinXMLTest.php.
78 $this->assertEquals(count($this->skin),0);
79 $this->assertEquals(count($this->skin->getStyles()),0);
80 $this->skin->addStyle($this->style1);
81 $this->assertEquals(count($this->skin),1);
82 $this->assertEquals(count($this->skin->getStyles()),1);
83 $this->skin->addStyle($this->style1);
84 $this->assertEquals(count($this->skin),2);
85 $this->assertEquals(count($this->skin->getStyles()),2);
86 $this->skin->addStyle($this->style2);
87 $this->assertEquals(count($this->skin),3);
88 $this->assertEquals(count($this->skin->getStyles()),3);
◆ testAsXML()
ilSystemStyleSkinXMLTest::testAsXML |
( |
| ) |
|
Definition at line 126 of file ilSystemStyleSkinXMLTest.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()
ilSystemStyleSkinXMLTest::testGetStyles |
( |
| ) |
|
◆ testReadXML()
ilSystemStyleSkinXMLTest::testReadXML |
( |
| ) |
|
Definition at line 141 of file ilSystemStyleSkinXMLTest.php.
References $skin.
142 $skin = ilSkinXML::parseFromXML($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml");
143 $this->assertEquals(
$skin->asXML(),file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml"));
◆ testRemoveStyles()
ilSystemStyleSkinXMLTest::testRemoveStyles |
( |
| ) |
|
Definition at line 99 of file ilSystemStyleSkinXMLTest.php.
100 $this->skin->addStyle($this->style1);
101 $this->skin->addStyle($this->style2);
102 $this->assertEquals(count($this->skin),2);
103 $this->skin->removeStyle(
"style1");
104 $this->assertEquals(count($this->skin),1);
105 $this->skin->removeStyle(
"style2");
106 $this->assertEquals(count($this->skin),0);
◆ testRemoveTestTwice()
ilSystemStyleSkinXMLTest::testRemoveTestTwice |
( |
| ) |
|
Definition at line 109 of file ilSystemStyleSkinXMLTest.php.
References 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()
ilSystemStyleSkinXMLTest::testSkinNameAndId |
( |
| ) |
|
Definition at line 71 of file ilSystemStyleSkinXMLTest.php.
72 $this->assertEquals(
"skin1", $this->skin->getId());
73 $this->assertEquals(
"skin 1", $this->skin->getName());
◆ testWriteXML()
ilSystemStyleSkinXMLTest::testWriteXML |
( |
| ) |
|
Definition at line 132 of file ilSystemStyleSkinXMLTest.php.
133 $this->skin->addStyle($this->style1);
134 $this->skin->addStyle($this->style2);
135 $this->skin->writeToXMLFile($this->system_style_config->getCustomizingSkinPath().
"skin1/template-copy.xml");
136 $this->assertEquals(file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template-copy.xml")
137 ,file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml"));
138 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: