ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSkinStyleLessVariableTest Class Reference
+ Inheritance diagram for ilSkinStyleLessVariableTest:
+ Collaboration diagram for ilSkinStyleLessVariableTest:

Public Member Functions

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

Detailed Description

Member Function Documentation

◆ testConstruct()

ilSkinStyleLessVariableTest::testConstruct ( )

Definition at line 12 of file ilSkinStyleLessVariableTest.php.

13  {
14  $variable = new ilSystemStyleLessVariable("name", "value", "comment", "category_name", ["references_id"]);
15  $this->assertEquals("name", $variable->getName());
16  $this->assertEquals("value", $variable->getValue());
17  $this->assertEquals("comment", $variable->getComment());
18  $this->assertEquals("category_name", $variable->getCategoryName());
19  $this->assertEquals(["references_id"], $variable->getReferences());
20  }

◆ testIconFontPathQuotation()

ilSkinStyleLessVariableTest::testIconFontPathQuotation ( )

Definition at line 47 of file ilSkinStyleLessVariableTest.php.

48  {
49  $variable = new ilSystemStyleLessVariable("icon-font-path", "value", "comment", "category_name", ["references_id"]);
50 
51  $variable->setValue("\"somePath\"");
52  $this->assertEquals("\"somePath\"", $variable->getValue());
53 
54  $variable->setValue("somePath");
55  $this->assertEquals("\"somePath\"", $variable->getValue());
56 
57 
58  $variable->setValue("\"somePath");
59  $this->assertEquals("\"somePath\"", $variable->getValue());
60 
61 
62  $variable->setValue("somePath\"");
63  $this->assertEquals("\"somePath\"", $variable->getValue());
64  }

◆ testIconFontPathUpdate()

ilSkinStyleLessVariableTest::testIconFontPathUpdate ( )

Definition at line 39 of file ilSkinStyleLessVariableTest.php.

40  {
41  $variable = new ilSystemStyleLessVariable("icon-font-path", "value", "comment", "category_name", ["references_id"]);
42 
43  $variable->setValue("\"../../libs/bower/bower_components/bootstrap/fonts/\"");
44  $this->assertEquals("\"../../../../libs/bower/bower_components/bootstrap/fonts/\"", $variable->getValue());
45  }

◆ testSetters()

ilSkinStyleLessVariableTest::testSetters ( )

Definition at line 22 of file ilSkinStyleLessVariableTest.php.

23  {
24  $variable = new ilSystemStyleLessVariable("name", "value", "comment", "category_name", ["references_id"]);
25 
26  $variable->setName("newName");
27  $variable->setValue("newValue");
28  $variable->setComment("newComment");
29  $variable->setCategoryName("new_category_name");
30  $variable->setReferences(["new_references_id"]);
31 
32  $this->assertEquals("newName", $variable->getName());
33  $this->assertEquals("newValue", $variable->getValue());
34  $this->assertEquals("newComment", $variable->getComment());
35  $this->assertEquals("new_category_name", $variable->getCategoryName());
36  $this->assertEquals(["new_references_id"], $variable->getReferences());
37  }

◆ testToString()

ilSkinStyleLessVariableTest::testToString ( )

Definition at line 66 of file ilSkinStyleLessVariableTest.php.

67  {
68  $variable = new ilSystemStyleLessVariable("name", "value", "comment", "category_name", ["references_id"]);
69  $this->assertEquals("//** comment\n@name:\t\tvalue;\n", (string) $variable);
70  }

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