ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSystemStyleSkinStyleLessCategoryTest.php
Go to the documentation of this file.
1<?php
2
3include_once("./Services/Style/System/classes/Less/class.ilSystemStyleLessCategory.php");
4
11{
12 public function testConstruct()
13 {
14 $category = new ilSystemStyleLessCategory("name", "comment");
15 $this->assertEquals("name", $category->getName());
16 $this->assertEquals("comment", $category->getComment());
17 }
18
19 public function testSetters()
20 {
21 $category = new ilSystemStyleLessCategory("name", "comment");
22
23 $category->setName("newName");
24 $category->setComment("newComment");
25
26 $this->assertEquals("newName", $category->getName());
27 $this->assertEquals("newComment", $category->getComment());
28 }
29
30 public function testToString()
31 {
32 $category = new ilSystemStyleLessCategory("name", "comment");
33
34 $this->assertEquals("//== name\n//\n//## comment\n", (string) $category);
35 }
36}
An exception for terminatinating execution or to throw for unit testing.
Capsules data of a less category in the variables to less file.