◆ setUp()
Definition at line 37 of file ilSkinXMLTest.php.
References ilSystemStyleSkinContainer\xCopy().
38 $this->skin =
new ilSkinXML(
"skin1",
"skin 1");
41 $this->style1->setCssFile(
"style1css");
42 $this->style1->setImageDirectory(
"style1image");
43 $this->style1->setSoundDirectory(
"style1sound");
44 $this->style1->setFontDirectory(
"style1font");
47 $this->style2->setCssFile(
"style2css");
48 $this->style2->setImageDirectory(
"style2image");
49 $this->style2->setSoundDirectory(
"style2sound");
50 $this->style2->setFontDirectory(
"style2font");
54 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 68 of file ilSkinXMLTest.php.
69 $this->assertEquals(count($this->skin),0);
70 $this->assertEquals(count($this->skin->getStyles()),0);
71 $this->skin->addStyle($this->style1);
72 $this->assertEquals(count($this->skin),1);
73 $this->assertEquals(count($this->skin->getStyles()),1);
74 $this->skin->addStyle($this->style1);
75 $this->assertEquals(count($this->skin),2);
76 $this->assertEquals(count($this->skin->getStyles()),2);
77 $this->skin->addStyle($this->style2);
78 $this->assertEquals(count($this->skin),3);
79 $this->assertEquals(count($this->skin->getStyles()),3);
◆ testAsXML()
ilSkinXMLTest::testAsXML |
( |
| ) |
|
Definition at line 117 of file ilSkinXMLTest.php.
118 $this->skin->addStyle($this->style1);
119 $this->skin->addStyle($this->style2);
120 $this->assertEquals($this->skin->asXML(),file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml"));
◆ testGetStyles()
ilSkinXMLTest::testGetStyles |
( |
| ) |
|
Definition at line 82 of file ilSkinXMLTest.php.
References $style1, and $style2.
83 $this->skin->addStyle($this->style1);
84 $this->skin->addStyle($this->style2);
86 $this->assertNotEquals($this->skin->getStyle(
"style2"),
$this->style1);
87 $this->assertEquals($this->skin->getStyle(
"style2"),
$this->style2);
◆ testReadXML()
ilSkinXMLTest::testReadXML |
( |
| ) |
|
Definition at line 132 of file ilSkinXMLTest.php.
References $skin.
133 $skin = ilSkinXML::parseFromXML($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml");
134 $this->assertEquals(
$skin->asXML(),file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml"));
◆ testRemoveStyles()
ilSkinXMLTest::testRemoveStyles |
( |
| ) |
|
Definition at line 90 of file ilSkinXMLTest.php.
91 $this->skin->addStyle($this->style1);
92 $this->skin->addStyle($this->style2);
93 $this->assertEquals(count($this->skin),2);
94 $this->skin->removeStyle(
"style1");
95 $this->assertEquals(count($this->skin),1);
96 $this->skin->removeStyle(
"style2");
97 $this->assertEquals(count($this->skin),0);
◆ testRemoveTestTwice()
ilSkinXMLTest::testRemoveTestTwice |
( |
| ) |
|
Definition at line 100 of file ilSkinXMLTest.php.
References ilSystemStyleException\INVALID_ID.
101 $this->skin->addStyle($this->style1);
102 $this->skin->addStyle($this->style2);
103 $this->assertEquals(count($this->skin),2);
104 $this->skin->removeStyle(
"style1");
105 $this->assertEquals(count($this->skin),1);
106 $this->skin->removeStyle(
"style2");
107 $this->assertEquals(count($this->skin),0);
109 $this->skin->removeStyle(
"style2");
110 $this->assertTrue(
false);
Class for advanced editing exception handling in ILIAS.
◆ testSkinNameAndId()
ilSkinXMLTest::testSkinNameAndId |
( |
| ) |
|
Definition at line 62 of file ilSkinXMLTest.php.
63 $this->assertEquals(
"skin1", $this->skin->getId());
64 $this->assertEquals(
"skin 1", $this->skin->getName());
◆ testWriteXML()
ilSkinXMLTest::testWriteXML |
( |
| ) |
|
Definition at line 123 of file ilSkinXMLTest.php.
124 $this->skin->addStyle($this->style1);
125 $this->skin->addStyle($this->style2);
126 $this->skin->writeToXMLFile($this->system_style_config->getCustomizingSkinPath().
"skin1/template-copy.xml");
127 $this->assertEquals(file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template-copy.xml")
128 ,file_get_contents($this->system_style_config->getCustomizingSkinPath().
"skin1/template.xml"));
129 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: