ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 14 of file ilSkinStyleLessVariableTest.php.

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

◆ testIconFontPathQuotation()

ilSkinStyleLessVariableTest::testIconFontPathQuotation ( )

Definition at line 49 of file ilSkinStyleLessVariableTest.php.

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

◆ testIconFontPathUpdate()

ilSkinStyleLessVariableTest::testIconFontPathUpdate ( )

Definition at line 41 of file ilSkinStyleLessVariableTest.php.

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

◆ testSetters()

ilSkinStyleLessVariableTest::testSetters ( )

Definition at line 24 of file ilSkinStyleLessVariableTest.php.

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

◆ testToString()

ilSkinStyleLessVariableTest::testToString ( )

Definition at line 68 of file ilSkinStyleLessVariableTest.php.

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

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