Class ilCtrlStructureMapperTest.
More...
◆ testStructureMapperReferenceListIndexesAfterInvalidReferenceIsRemoved()
ilCtrlStructureMapperTest::testStructureMapperReferenceListIndexesAfterInvalidReferenceIsRemoved |
( |
| ) |
|
Definition at line 177 of file ilCtrlStructureMapperTest.php.
177 : void
178 {
180 'class1' => [
182 0 => 'class3',
183 1 => 'class2',
184 ],
185 ],
186 'class2' => [],
187 ]);
188
189 $this->assertEquals(
190 [
191 'class1' => [
193 0 => 'class2',
194 ],
195 ],
196 'class2' => [
198 0 => 'class1',
199 ],
200 ],
201 ],
202 $mapper->getStructure()
203 );
204 }
Class ilCtrlStructureMapper.
References ilCtrlStructureInterface\KEY_CLASS_CHILDREN, and ilCtrlStructureInterface\KEY_CLASS_PARENTS.
◆ testStructureMapperWithAssociativeStringArray()
ilCtrlStructureMapperTest::testStructureMapperWithAssociativeStringArray |
( |
| ) |
|
Definition at line 44 of file ilCtrlStructureMapperTest.php.
44 : void
45 {
47 'key0' => 'entry0',
48 'key1' => 'entry1',
49 'key2' => 'entry2'
50 ]);
51
52 $this->assertEmpty($mapper->getStructure());
53 }
◆ testStructureMapperWithCommonStringArray()
ilCtrlStructureMapperTest::testStructureMapperWithCommonStringArray |
( |
| ) |
|
Definition at line 36 of file ilCtrlStructureMapperTest.php.
36 : void
37 {
38 $expected_values = ['entry0', 'entry1', 'entry2'];
40
41 $this->assertEmpty($mapper->getStructure());
42 }
◆ testStructureMapperWithEmptyArray()
ilCtrlStructureMapperTest::testStructureMapperWithEmptyArray |
( |
| ) |
|
◆ testStructureMapperWithEmptyClassData()
ilCtrlStructureMapperTest::testStructureMapperWithEmptyClassData |
( |
| ) |
|
Definition at line 55 of file ilCtrlStructureMapperTest.php.
55 : void
56 {
57 $expected_values = [
58 'key0' => [],
59 'key1' => [],
60 'key2' => []
61 ];
62
64
65 $this->assertEquals(
66 $expected_values,
67 $mapper->getStructure()
68 );
69 }
◆ testStructureMapperWithInvalidReferenceInList()
ilCtrlStructureMapperTest::testStructureMapperWithInvalidReferenceInList |
( |
| ) |
|
◆ testStructureMapperWithMissingReferenceLists()
ilCtrlStructureMapperTest::testStructureMapperWithMissingReferenceLists |
( |
| ) |
|
Definition at line 118 of file ilCtrlStructureMapperTest.php.
118 : void
119 {
121 'class0' => [
123 'class1',
124 ],
125 ],
126 'class1' => [
128 'class2',
129 ],
130 ],
131 'class2' => []
132 ]);
133
134 $this->assertEquals(
135 [
136 'class0' => [
138 'class1',
139 ],
140 ],
141 'class1' => [
143 'class2',
144 'class0',
145 ],
146 ],
147 'class2' => [
149 'class1',
150 ],
151 ]
152 ],
153 $mapper->getStructure()
154 );
155 }
References ilCtrlStructureInterface\KEY_CLASS_CHILDREN, and ilCtrlStructureInterface\KEY_CLASS_PARENTS.
◆ testStructureMapperWithMixedArray()
ilCtrlStructureMapperTest::testStructureMapperWithMixedArray |
( |
| ) |
|
Definition at line 206 of file ilCtrlStructureMapperTest.php.
206 : void
207 {
209 'class1' => [],
210 'class2' => false,
211 3 => [
213 'class1',
214 ],
215 ],
216 'class3' => [
218 'class1',
219 'class2',
220 ],
221 ],
222 'class4' => [
224 3
225 ],
226 ],
227 ]);
228
229 $this->assertEquals(
230 [
231 'class1' => [
233 'class3',
234 ],
235 ],
236 'class3' => [
238 'class1',
239 ],
240 ],
241 'class4' => [
243 ],
244 ],
245 $mapper->getStructure()
246 );
247 }
References ilCtrlStructureInterface\KEY_CLASS_CHILDREN, and ilCtrlStructureInterface\KEY_CLASS_PARENTS.
◆ testStructureMapperWithStructureArray()
ilCtrlStructureMapperTest::testStructureMapperWithStructureArray |
( |
| ) |
|
Definition at line 71 of file ilCtrlStructureMapperTest.php.
71 : void
72 {
74 'class0' => [
76 'class1',
77 ],
79 ],
80 'class1' => [
83 'class2',
84 ],
85 ],
86 'class2' => [
89 ]
90 ]);
91
92 $this->assertEquals(
93 [
94 'class0' => [
96 'class1',
97 ],
99 ],
100 'class1' => [
103 'class2',
104 'class0',
105 ],
106 ],
107 'class2' => [
109 'class1',
110 ],
112 ]
113 ],
114 $mapper->getStructure()
115 );
116 }
References ilCtrlStructureInterface\KEY_CLASS_CHILDREN, and ilCtrlStructureInterface\KEY_CLASS_PARENTS.
The documentation for this class was generated from the following file: