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