ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
LSSettingsTest Class Reference
+ Inheritance diagram for LSSettingsTest:
+ Collaboration diagram for LSSettingsTest:

Public Member Functions

 testCreate ()
 
 testWithAbstract (ilLearningSequenceSettings $object)
 
 testWithExtro (ilLearningSequenceSettings $object)
 
 testWithAbstractImage (ilLearningSequenceSettings $object)
 
 testWithExtroImage (ilLearningSequenceSettings $object)
 
 testWithMembersGallery (ilLearningSequenceSettings $object)
 
 testWithMode (ilLearningSequenceSettings $object)
 

Data Fields

const TO_OBJ_ID = 10
 
const TO_ABSTRACT = "abstract"
 
const TO_EXTRO = "extro"
 
const TO_ABSTRACT_IMAGE = "abstract/image/path"
 
const TO_EXTRO_IMAGE = "extro/image/path"
 
const TO_MEMBERS_GALLERY = true
 
const TO_MODE = ilLearningSequenceSettings::MODE_ADAPTIVE
 

Detailed Description

Member Function Documentation

◆ testCreate()

LSSettingsTest::testCreate ( )

Definition at line 36 of file LSSettingsTest.php.

37 {
38 $object = new ilLearningSequenceSettings(
39 self::TO_OBJ_ID,
40 self::TO_ABSTRACT,
41 self::TO_EXTRO,
42 self::TO_ABSTRACT_IMAGE,
43 self::TO_EXTRO_IMAGE,
44 self::TO_MEMBERS_GALLERY,
45 self::TO_MODE
46 );
47
48 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
49 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
50 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
51 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
52 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
53 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
54 $this->assertEquals($object->getMode(), self::TO_MODE);
55
56 return $object;
57 }
Settings for an LSO (like abstract, extro)

◆ testWithAbstract()

LSSettingsTest::testWithAbstract ( ilLearningSequenceSettings  $object)

Definition at line 60 of file LSSettingsTest.php.

61 {
62 $new_object = $object->withAbstract("teststring");
63
64 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
65 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
66 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
67 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
68 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
69 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
70
71 $this->assertEquals($new_object->getObjId(), self::TO_OBJ_ID);
72 $this->assertEquals($new_object->getAbstract(), "teststring");
73 $this->assertEquals($new_object->getExtro(), self::TO_EXTRO);
74 $this->assertEquals($new_object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
75 $this->assertEquals($new_object->getExtroImage(), self::TO_EXTRO_IMAGE);
76 $this->assertEquals($new_object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
77 }

References ilLearningSequenceSettings\getAbstract(), ilLearningSequenceSettings\getAbstractImage(), ilLearningSequenceSettings\getExtro(), ilLearningSequenceSettings\getExtroImage(), ilLearningSequenceSettings\getMembersGallery(), ilLearningSequenceSettings\getObjId(), and ilLearningSequenceSettings\withAbstract().

+ Here is the call graph for this function:

◆ testWithAbstractImage()

LSSettingsTest::testWithAbstractImage ( ilLearningSequenceSettings  $object)

Definition at line 100 of file LSSettingsTest.php.

101 {
102 $new_object = $object->withAbstractImage("teststring");
103
104 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
105 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
106 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
107 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
108 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
109 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
110
111 $this->assertEquals($new_object->getObjId(), self::TO_OBJ_ID);
112 $this->assertEquals($new_object->getAbstract(), self::TO_ABSTRACT);
113 $this->assertEquals($new_object->getExtro(), self::TO_EXTRO);
114 $this->assertEquals($new_object->getAbstractImage(), "teststring");
115 $this->assertEquals($new_object->getExtroImage(), self::TO_EXTRO_IMAGE);
116 $this->assertEquals($new_object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
117 }

References ilLearningSequenceSettings\getAbstract(), ilLearningSequenceSettings\getAbstractImage(), ilLearningSequenceSettings\getExtro(), ilLearningSequenceSettings\getExtroImage(), ilLearningSequenceSettings\getMembersGallery(), ilLearningSequenceSettings\getObjId(), and ilLearningSequenceSettings\withAbstractImage().

+ Here is the call graph for this function:

◆ testWithExtro()

LSSettingsTest::testWithExtro ( ilLearningSequenceSettings  $object)

Definition at line 80 of file LSSettingsTest.php.

81 {
82 $new_object = $object->withExtro("teststring");
83
84 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
85 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
86 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
87 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
88 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
89 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
90
91 $this->assertEquals($new_object->getObjId(), self::TO_OBJ_ID);
92 $this->assertEquals($new_object->getAbstract(), self::TO_ABSTRACT);
93 $this->assertEquals($new_object->getExtro(), "teststring");
94 $this->assertEquals($new_object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
95 $this->assertEquals($new_object->getExtroImage(), self::TO_EXTRO_IMAGE);
96 $this->assertEquals($new_object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
97 }

References ilLearningSequenceSettings\getAbstract(), ilLearningSequenceSettings\getAbstractImage(), ilLearningSequenceSettings\getExtro(), ilLearningSequenceSettings\getExtroImage(), ilLearningSequenceSettings\getMembersGallery(), ilLearningSequenceSettings\getObjId(), and ilLearningSequenceSettings\withExtro().

+ Here is the call graph for this function:

◆ testWithExtroImage()

LSSettingsTest::testWithExtroImage ( ilLearningSequenceSettings  $object)

Definition at line 120 of file LSSettingsTest.php.

121 {
122 $new_object = $object->withExtroImage("teststring");
123
124 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
125 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
126 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
127 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
128 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
129 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
130
131 $this->assertEquals($new_object->getObjId(), self::TO_OBJ_ID);
132 $this->assertEquals($new_object->getAbstract(), self::TO_ABSTRACT);
133 $this->assertEquals($new_object->getExtro(), self::TO_EXTRO);
134 $this->assertEquals($new_object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
135 $this->assertEquals($new_object->getExtroImage(), "teststring");
136 $this->assertEquals($new_object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
137 }

References ilLearningSequenceSettings\getAbstract(), ilLearningSequenceSettings\getAbstractImage(), ilLearningSequenceSettings\getExtro(), ilLearningSequenceSettings\getExtroImage(), ilLearningSequenceSettings\getMembersGallery(), ilLearningSequenceSettings\getObjId(), and ilLearningSequenceSettings\withExtroImage().

+ Here is the call graph for this function:

◆ testWithMembersGallery()

LSSettingsTest::testWithMembersGallery ( ilLearningSequenceSettings  $object)

Definition at line 140 of file LSSettingsTest.php.

141 {
142 $new_object = $object->withMembersGallery(false);
143
144 $this->assertEquals($object->getObjId(), self::TO_OBJ_ID);
145 $this->assertEquals($object->getAbstract(), self::TO_ABSTRACT);
146 $this->assertEquals($object->getExtro(), self::TO_EXTRO);
147 $this->assertEquals($object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
148 $this->assertEquals($object->getExtroImage(), self::TO_EXTRO_IMAGE);
149 $this->assertEquals($object->getMembersGallery(), self::TO_MEMBERS_GALLERY);
150
151 $this->assertEquals($new_object->getObjId(), self::TO_OBJ_ID);
152 $this->assertEquals($new_object->getAbstract(), self::TO_ABSTRACT);
153 $this->assertEquals($new_object->getExtro(), self::TO_EXTRO);
154 $this->assertEquals($new_object->getAbstractImage(), self::TO_ABSTRACT_IMAGE);
155 $this->assertEquals($new_object->getExtroImage(), self::TO_EXTRO_IMAGE);
156 $this->assertEquals($new_object->getMembersGallery(), false);
157 }

References ilLearningSequenceSettings\getAbstract(), ilLearningSequenceSettings\getAbstractImage(), ilLearningSequenceSettings\getExtro(), ilLearningSequenceSettings\getExtroImage(), ilLearningSequenceSettings\getMembersGallery(), ilLearningSequenceSettings\getObjId(), and ilLearningSequenceSettings\withMembersGallery().

+ Here is the call graph for this function:

◆ testWithMode()

LSSettingsTest::testWithMode ( ilLearningSequenceSettings  $object)

Definition at line 160 of file LSSettingsTest.php.

160 : void
161 {
163
164 $this->assertEquals($object->getMode(), self::TO_MODE);
165 $this->assertEquals($new_object->getMode(), ilLearningSequenceSettings::MODE_LINEAR);
166 }

References ilLearningSequenceSettings\getMode(), ilLearningSequenceSettings\MODE_LINEAR, and ilLearningSequenceSettings\withMode().

+ Here is the call graph for this function:

Field Documentation

◆ TO_ABSTRACT

const LSSettingsTest::TO_ABSTRACT = "abstract"

Definition at line 29 of file LSSettingsTest.php.

◆ TO_ABSTRACT_IMAGE

const LSSettingsTest::TO_ABSTRACT_IMAGE = "abstract/image/path"

Definition at line 31 of file LSSettingsTest.php.

◆ TO_EXTRO

const LSSettingsTest::TO_EXTRO = "extro"

Definition at line 30 of file LSSettingsTest.php.

◆ TO_EXTRO_IMAGE

const LSSettingsTest::TO_EXTRO_IMAGE = "extro/image/path"

Definition at line 32 of file LSSettingsTest.php.

◆ TO_MEMBERS_GALLERY

const LSSettingsTest::TO_MEMBERS_GALLERY = true

Definition at line 33 of file LSSettingsTest.php.

◆ TO_MODE

const LSSettingsTest::TO_MODE = ilLearningSequenceSettings::MODE_ADAPTIVE

Definition at line 34 of file LSSettingsTest.php.

◆ TO_OBJ_ID

const LSSettingsTest::TO_OBJ_ID = 10

Definition at line 28 of file LSSettingsTest.php.


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