◆ testActiveFrom()
PCSectionTest::testActiveFrom |
( |
| ) |
|
Definition at line 91 of file PCSectionTest.php.
91 : void
92 {
95 $pc_sec->create($page, "pg");
96 $pc_sec->setActiveFrom(1234);
97
98 $this->assertEquals(
99 1234,
100 $pc_sec->getActiveFrom()
101 );
102
103 $expected = <<<EOT
104<PageObject HierId="pg"><PageContent><Section Characteristic="Block" ActiveFrom="1234"></Section></PageContent></PageObject>
105EOT;
106
108 $expected,
109 $page->getXMLFromDom()
110 );
111 }
assertXmlEquals(string $expected_xml_as_string, string $html_xml_string)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testActiveTo()
PCSectionTest::testActiveTo |
( |
| ) |
|
Definition at line 113 of file PCSectionTest.php.
113 : void
114 {
117 $pc_sec->create($page, "pg");
118 $pc_sec->setActiveTo(5678);
119
120 $this->assertEquals(
121 5678,
122 $pc_sec->getActiveTo()
123 );
124
125 $expected = <<<EOT
126<PageObject HierId="pg"><PageContent><Section Characteristic="Block" ActiveTo="5678"></Section></PageContent></PageObject>
127EOT;
128
130 $expected,
131 $page->getXMLFromDom()
132 );
133 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testCharacteristic()
PCSectionTest::testCharacteristic |
( |
| ) |
|
Definition at line 47 of file PCSectionTest.php.
47 : void
48 {
51 $pc_sec->create($page, "pg");
52 $pc_sec->setCharacteristic("MyChar");
53
54 $this->assertEquals(
55 "MyChar",
56 $pc_sec->getCharacteristic()
57 );
58
59 $expected = <<<EOT
60<PageObject HierId="pg"><PageContent><Section Characteristic="MyChar"></Section></PageContent></PageObject>
61EOT;
62
64 $expected,
65 $page->getXMLFromDom()
66 );
67 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testConstruction()
PCSectionTest::testConstruction |
( |
| ) |
|
◆ testCreate()
PCSectionTest::testCreate |
( |
| ) |
|
◆ testExtLink()
PCSectionTest::testExtLink |
( |
| ) |
|
Definition at line 179 of file PCSectionTest.php.
179 : void
180 {
183 $pc_sec->create($page, "pg");
184 $pc_sec->setExtLink("https://www.ilias.de");
185
186 $ext_link = $pc_sec->getLink();
187
188 $this->assertEquals(
189 "ExtLink",
190 $ext_link["LinkType"]
191 );
192
193 $this->assertEquals(
194 "https://www.ilias.de",
195 $ext_link["Href"]
196 );
197
198 $expected = <<<EOT
199<PageObject HierId="pg"><PageContent><Section Characteristic="Block"><ExtLink Href="https://www.ilias.de"></ExtLink></Section></PageContent></PageObject>
200EOT;
201
203 $expected,
204 $page->getXMLFromDom()
205 );
206 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testIntLink()
PCSectionTest::testIntLink |
( |
| ) |
|
Definition at line 208 of file PCSectionTest.php.
208 : void
209 {
212 $pc_sec->create($page, "pg");
213 $pc_sec->setIntLink("mytype", "mytarget", "myframe");
214
215 $link = $pc_sec->getLink();
216
217 $this->assertEquals(
218 "IntLink",
219 $link["LinkType"]
220 );
221
222 $this->assertEquals(
223 "mytype",
224 $link["Type"]
225 );
226
227 $this->assertEquals(
228 "mytarget",
229 $link["Target"]
230 );
231
232 $this->assertEquals(
233 "myframe",
234 $link["TargetFrame"]
235 );
236
237 $expected = <<<EOT
238<PageObject HierId=
"pg"><PageContent><Section Characteristic=
"Block"><
IntLink Type=
"mytype" Target=
"mytarget" TargetFrame=
"myframe"></
IntLink></Section></PageContent></PageObject>
239EOT;
240
242 $expected,
243 $page->getXMLFromDom()
244 );
245 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testModel()
PCSectionTest::testModel |
( |
| ) |
|
Definition at line 280 of file PCSectionTest.php.
280 : void
281 {
284 $pc_sec->create($page, "pg");
285
286 $pc_sec->setProtected(true);
287
288 $model = new stdClass();
289 $model->protected = true;
290
291
292 $this->assertEquals(
293 $model,
294 $pc_sec->getModel()
295 );
296 }
References COPageTestBase\getEmptyPageWithDom().
◆ testNoLink()
PCSectionTest::testNoLink |
( |
| ) |
|
Definition at line 247 of file PCSectionTest.php.
247 : void
248 {
251 $pc_sec->create($page, "pg");
252
253 $link = $pc_sec->getLink();
254
255 $this->assertEquals(
256 "NoLink",
257 $link["LinkType"]
258 );
259
260 $pc_sec->setIntLink("mytype", "mytarget", "myframe");
261 $pc_sec->setNoLink();
262
263 $link = $pc_sec->getLink();
264
265 $this->assertEquals(
266 "NoLink",
267 $link["LinkType"]
268 );
269
270 $expected = <<<EOT
271<PageObject HierId="pg"><PageContent><Section Characteristic="Block"></Section></PageContent></PageObject>
272EOT;
273
275 $expected,
276 $page->getXMLFromDom()
277 );
278 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testPermission()
PCSectionTest::testPermission |
( |
| ) |
|
Definition at line 135 of file PCSectionTest.php.
135 : void
136 {
139 $pc_sec->create($page, "pg");
140 $pc_sec->setPermission("write");
141
142 $this->assertEquals(
143 "write",
144 $pc_sec->getPermission()
145 );
146
147 $expected = <<<EOT
148<PageObject HierId="pg"><PageContent><Section Characteristic="Block" Permission="write"></Section></PageContent></PageObject>
149EOT;
150
152 $expected,
153 $page->getXMLFromDom()
154 );
155 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testPermissionRefId()
PCSectionTest::testPermissionRefId |
( |
| ) |
|
Definition at line 157 of file PCSectionTest.php.
157 : void
158 {
161 $pc_sec->create($page, "pg");
162 $pc_sec->setPermissionRefId(10);
163
164 $this->assertEquals(
165 10,
166 $pc_sec->getPermissionRefId()
167 );
168
169 $expected = <<<EOT
170<PageObject HierId="pg"><PageContent><Section Characteristic="Block" PermissionRefId="il__ref_10"></Section></PageContent></PageObject>
171EOT;
172
174 $expected,
175 $page->getXMLFromDom()
176 );
177 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
◆ testProtected()
PCSectionTest::testProtected |
( |
| ) |
|
Definition at line 69 of file PCSectionTest.php.
69 : void
70 {
73 $pc_sec->create($page, "pg");
74 $pc_sec->setProtected(true);
75
76 $this->assertEquals(
77 true,
78 $pc_sec->getProtected()
79 );
80
81 $expected = <<<EOT
82<PageObject HierId="pg"><PageContent><Section Characteristic="Block" Protected="1"></Section></PageContent></PageObject>
83EOT;
84
86 $expected,
87 $page->getXMLFromDom()
88 );
89 }
References COPageTestBase\assertXmlEquals(), and COPageTestBase\getEmptyPageWithDom().
The documentation for this class was generated from the following file: