ILIAS  release_8 Revision v8.24
ilSystemStyleSkinStyleLessCategoryTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once('libs/composer/vendor/autoload.php');
22
23use PHPUnit\Framework\TestCase;
24
26{
27 public function testConstruct(): void
28 {
29 $category = new ilSystemStyleLessCategory('name', 'comment');
30 $this->assertEquals('name', $category->getName());
31 $this->assertEquals('comment', $category->getComment());
32 }
33
34 public function testSetters(): void
35 {
36 $category = new ilSystemStyleLessCategory('name', 'comment');
37
38 $category->setName('newName');
39 $category->setComment('newComment');
40
41 $this->assertEquals('newName', $category->getName());
42 $this->assertEquals('newComment', $category->getComment());
43 }
44
45 public function testToString(): void
46 {
47 $category = new ilSystemStyleLessCategory('name', 'comment');
48
49 $this->assertEquals("//== name\n//\n//## comment\n", (string) $category);
50 }
51}
Capsules data of a less category in the variables to less file.