◆ getCellForHierId()
PCGridTest::getCellForHierId |
( |
ilPageObject |
$page, |
|
|
string |
$hier_id |
|
) |
| |
|
protected |
◆ getPageWithGrid()
PCGridTest::getPageWithGrid |
( |
| ) |
|
|
protected |
Definition at line 293 of file PCGridTest.php.
294 {
297 $pc->create($page, "pg");
298 $pc->applyTemplate(
300 0,
301 0,
302 0,
303 0,
304 0
305 );
306 $page->addHierIDs();
307 $page->insertPCIds();
308 $pc->setHierId("1");
309 return $page;
310 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
References COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MAIN_SIDE.
Referenced by testMoveLeft(), and testMoveRight().
◆ testAddCell()
PCGridTest::testAddCell |
( |
| ) |
|
Definition at line 221 of file PCGridTest.php.
221 : void
222 {
225 $pc->create($page, "pg");
226 $pc->applyTemplate(
228 1,
229 12,
230 6,
231 3,
232 3
233 );
234 $pc->addCell();
235
236 $expected = <<<EOT
237<PageObject HierId="pg"><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="" WIDTH_M="" WIDTH_L="" WIDTH_XL=""/></Grid></PageContent></PageObject>
238EOT;
239
241 $expected,
242 $page->getXMLFromDom()
243 );
244 }
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MANUAL.
◆ testAddGridCell()
PCGridTest::testAddGridCell |
( |
| ) |
|
Definition at line 196 of file PCGridTest.php.
196 : void
197 {
200 $pc->create($page, "pg");
201 $pc->applyTemplate(
203 1,
204 12,
205 6,
206 3,
207 3
208 );
209 $pc->addGridCell(12, 12, 12, 6);
210
211 $expected = <<<EOT
212<PageObject HierId="pg"><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="12" WIDTH_L="12" WIDTH_XL="6"/></Grid></PageContent></PageObject>
213EOT;
214
216 $expected,
217 $page->getXMLFromDom()
218 );
219 }
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MANUAL.
◆ testApplyTemplateManual()
PCGridTest::testApplyTemplateManual |
( |
| ) |
|
Definition at line 71 of file PCGridTest.php.
71 : void
72 {
75 $pc->create($page, "pg");
76 $pc->applyTemplate(
78 4,
79 12,
80 6,
81 3,
82 3
83 );
84
85 $expected = <<<EOT
86<PageObject HierId="pg"><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="3" WIDTH_XL="3"/></Grid></PageContent></PageObject>
87EOT;
88
90 $expected,
91 $page->getXMLFromDom()
92 );
93 }
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MANUAL.
◆ testApplyTemplateTwoColumn()
PCGridTest::testApplyTemplateTwoColumn |
( |
| ) |
|
Definition at line 47 of file PCGridTest.php.
47 : void
48 {
51 $pc->create($page, "pg");
52 $pc->applyTemplate(
54 0,
55 0,
56 0,
57 0,
58 0
59 );
60
61 $expected = <<<EOT
62<PageObject HierId="pg"><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="6" WIDTH_XL="6"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="6" WIDTH_XL="6"/></Grid></PageContent></PageObject>
63EOT;
64
66 $expected,
67 $page->getXMLFromDom()
68 );
69 }
const TEMPLATE_TWO_COLUMN
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_TWO_COLUMN.
◆ testCellData()
PCGridTest::testCellData |
( |
| ) |
|
Definition at line 247 of file PCGridTest.php.
247 : void
248 {
251 $pc->create($page, "pg");
252 $pc->applyTemplate(
254 0,
255 0,
256 0,
257 0,
258 0
259 );
260 $page->addHierIDs();
261
262 $this->assertEquals(
263 [
264 0 => [
265 "xs" => "",
266 "s" => "12",
267 "m" => "6",
268 "l" => "8",
269 "xl" => "9",
270 "pc_id" => "",
271 "hier_id" => "1_1",
272 "pos" => 0
273 ],
274 1 => [
275 "xs" => "",
276 "s" => "12",
277 "m" => "6",
278 "l" => "4",
279 "xl" => "3",
280 "pc_id" => "",
281 "hier_id" => "1_2",
282 "pos" => 1
283 ]
284 ],
285 $pc->getCellData()
286 );
287 }
References COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MAIN_SIDE.
◆ testConstruction()
PCGridTest::testConstruction |
( |
| ) |
|
◆ testCreate()
PCGridTest::testCreate |
( |
| ) |
|
◆ testDelete()
PCGridTest::testDelete |
( |
| ) |
|
Definition at line 169 of file PCGridTest.php.
169 : void
170 {
173 $pc->create($page, "pg");
174 $pc->applyTemplate(
176 0,
177 0,
178 0,
179 0,
180 0
181 );
182 $page->addHierIDs();
183 $pc->deleteGridCell("1_2", "");
184 $page->stripHierIDs();
185
186 $expected = <<<EOT
187<PageObject><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="8" WIDTH_XL="9"/></Grid></PageContent></PageObject>
188EOT;
189
191 $expected,
192 $page->getXMLFromDom()
193 );
194 }
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MAIN_SIDE.
◆ testMoveLeft()
PCGridTest::testMoveLeft |
( |
| ) |
|
Definition at line 341 of file PCGridTest.php.
341 : void
342 {
345 $cell->moveCellLeft();
346 $page->stripHierIDs();
347 $page->stripPCIDs();
348
349 $expected = <<<EOT
350<PageObject><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="4" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="8" WIDTH_XL="9"/></Grid></PageContent></PageObject>
351EOT;
352
354 $expected,
355 $page->getXMLFromDom()
356 );
357 }
getCellForHierId(ilPageObject $page, string $hier_id)
References COPageTestBase\assertXmlEquals(), getCellForHierId(), and getPageWithGrid().
◆ testMoveRight()
PCGridTest::testMoveRight |
( |
| ) |
|
Definition at line 323 of file PCGridTest.php.
323 : void
324 {
327 $cell->moveCellRight();
328 $page->stripHierIDs();
329 $page->stripPCIDs();
330
331 $expected = <<<EOT
332<PageObject><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="4" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="8" WIDTH_XL="9"/></Grid></PageContent></PageObject>
333EOT;
334
336 $expected,
337 $page->getXMLFromDom()
338 );
339 }
References COPageTestBase\assertXmlEquals(), getCellForHierId(), and getPageWithGrid().
◆ testPositions()
PCGridTest::testPositions |
( |
| ) |
|
Definition at line 95 of file PCGridTest.php.
95 : void
96 {
99 $pc->create($page, "pg");
100 $pc->applyTemplate(
102 0,
103 0,
104 0,
105 0,
106 0
107 );
108 $page->addHierIDs();
109 $pc->savePositions([
110 "1_1:" => 20,
111 "1_2:" => 10
112 ]);
113 $page->stripHierIDs();
114
115 $expected = <<<EOT
116<PageObject><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="4" WIDTH_XL="3"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="6" WIDTH_L="8" WIDTH_XL="9"/></Grid></PageContent></PageObject>
117EOT;
118
120 $expected,
121 $page->getXMLFromDom()
122 );
123 }
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MAIN_SIDE.
◆ testWidths()
PCGridTest::testWidths |
( |
| ) |
|
Definition at line 125 of file PCGridTest.php.
125 : void
126 {
129 $pc->create($page, "pg");
130 $pc->applyTemplate(
132 0,
133 0,
134 0,
135 0,
136 0
137 );
138 $page->addHierIDs();
139 $pc->saveWidths(
140 [
141 "1_1:" => 12,
142 "1_2:" => 12
143 ],
144 [
145 "1_1:" => 12,
146 "1_2:" => 12
147 ],
148 [
149 "1_1:" => 6,
150 "1_2:" => 6
151 ],
152 [
153 "1_1:" => 6,
154 "1_2:" => 6
155 ],
156 );
157 $page->stripHierIDs();
158
159 $expected = <<<EOT
160<PageObject><PageContent><Grid><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="12" WIDTH_L="6" WIDTH_XL="6"/><GridCell WIDTH_XS="" WIDTH_S="12" WIDTH_M="12" WIDTH_L="6" WIDTH_XL="6"/></Grid></PageContent></PageObject>
161EOT;
162
164 $expected,
165 $page->getXMLFromDom()
166 );
167 }
References COPageTestBase\assertXmlEquals(), COPageTestBase\getEmptyPageWithDom(), and ilPCGridGUI\TEMPLATE_MAIN_SIDE.
The documentation for this class was generated from the following file: