ILIAS  release_8 Revision v8.24
ilSkinStyleLessVariableTest Class Reference
+ Inheritance diagram for ilSkinStyleLessVariableTest:
+ Collaboration diagram for ilSkinStyleLessVariableTest:

Public Member Functions

 testConstruct ()
 
 testSetters ()
 
 testIconFontPathUpdate ()
 
 testIconFontPathQuotation ()
 
 testToString ()
 

Detailed Description

Definition at line 25 of file ilSkinStyleLessVariableTest.php.

Member Function Documentation

◆ testConstruct()

ilSkinStyleLessVariableTest::testConstruct ( )

Definition at line 27 of file ilSkinStyleLessVariableTest.php.

27 : void
28 {
29 $variable = new ilSystemStyleLessVariable('name', 'value', 'comment', 'category_name', ['references_id']);
30 $this->assertEquals('name', $variable->getName());
31 $this->assertEquals('value', $variable->getValue());
32 $this->assertEquals('comment', $variable->getComment());
33 $this->assertEquals('category_name', $variable->getCategoryName());
34 $this->assertEquals(['references_id'], $variable->getReferences());
35 }

◆ testIconFontPathQuotation()

ilSkinStyleLessVariableTest::testIconFontPathQuotation ( )

Definition at line 62 of file ilSkinStyleLessVariableTest.php.

62 : void
63 {
64 $variable = new ilSystemStyleLessVariable('il-icon-font-path', 'value', 'comment', 'category_name', ['references_id']);
65
66 $variable->setValue("\"somePath\"");
67 $this->assertEquals("\"somePath\"", $variable->getValue());
68
69 $variable->setValue('somePath');
70 $this->assertEquals("\"somePath\"", $variable->getValue());
71
72
73 $variable->setValue("\"somePath");
74 $this->assertEquals("\"somePath\"", $variable->getValue());
75
76
77 $variable->setValue("somePath\"");
78 $this->assertEquals("\"somePath\"", $variable->getValue());
79 }

◆ testIconFontPathUpdate()

ilSkinStyleLessVariableTest::testIconFontPathUpdate ( )

Definition at line 54 of file ilSkinStyleLessVariableTest.php.

54 : void
55 {
56 $variable = new ilSystemStyleLessVariable('il-icon-font-path', 'value', 'comment', 'category_name', ['references_id']);
57
58 $variable->setValue("\"../../node_modules/bootstrap/fonts/\"");
59 $this->assertEquals("\"../../../../node_modules/bootstrap/fonts/\"", $variable->getValue());
60 }

◆ testSetters()

ilSkinStyleLessVariableTest::testSetters ( )

Definition at line 37 of file ilSkinStyleLessVariableTest.php.

37 : void
38 {
39 $variable = new ilSystemStyleLessVariable('name', 'value', 'comment', 'category_name', ['references_id']);
40
41 $variable->setName('newName');
42 $variable->setValue('newValue');
43 $variable->setComment('newComment');
44 $variable->setCategoryName('new_category_name');
45 $variable->setReferences(['new_references_id']);
46
47 $this->assertEquals('newName', $variable->getName());
48 $this->assertEquals('newValue', $variable->getValue());
49 $this->assertEquals('newComment', $variable->getComment());
50 $this->assertEquals('new_category_name', $variable->getCategoryName());
51 $this->assertEquals(['new_references_id'], $variable->getReferences());
52 }

◆ testToString()

ilSkinStyleLessVariableTest::testToString ( )

Definition at line 81 of file ilSkinStyleLessVariableTest.php.

81 : void
82 {
83 $variable = new ilSystemStyleLessVariable('name', 'value', 'comment', 'category_name', ['references_id']);
84 $this->assertEquals("//** comment\n@name:\t\tvalue;\n", (string) $variable);
85 }

The documentation for this class was generated from the following file: