1 | <?php |
||
20 | class RestContentTest extends ValueObjectVisitorBaseTest |
||
21 | { |
||
22 | /** @var \eZ\Publish\Core\Helper\TranslationHelper|\PHPUnit\Framework\MockObject\MockObject */ |
||
23 | private $translationHelper; |
||
24 | |||
25 | protected function setUp(): void |
||
34 | |||
35 | /** |
||
36 | * @return \DOMDocument |
||
37 | */ |
||
38 | public function testVisitWithoutEmbeddedVersion() |
||
111 | |||
112 | protected function getBasicRestContent() |
||
142 | |||
143 | /** |
||
144 | * @param \DOMDocument $dom |
||
145 | * |
||
146 | * @depends testVisitWithoutEmbeddedVersion |
||
147 | */ |
||
148 | public function testContentHrefCorrect(\DOMDocument $dom) |
||
152 | |||
153 | /** |
||
154 | * @param \DOMDocument $dom |
||
155 | * |
||
156 | * @depends testVisitWithoutEmbeddedVersion |
||
157 | */ |
||
158 | public function testContentIdCorrect(\DOMDocument $dom) |
||
162 | |||
163 | /** |
||
164 | * @param \DOMDocument $dom |
||
165 | * |
||
166 | * @depends testVisitWithoutEmbeddedVersion |
||
167 | */ |
||
168 | public function testContentMediaTypeWithoutVersionCorrect(\DOMDocument $dom) |
||
172 | |||
173 | /** |
||
174 | * @param \DOMDocument $dom |
||
175 | * |
||
176 | * @depends testVisitWithoutEmbeddedVersion |
||
177 | */ |
||
178 | public function testContentRemoteIdCorrect(\DOMDocument $dom) |
||
182 | |||
183 | /** |
||
184 | * @param \DOMDocument $dom |
||
185 | * |
||
186 | * @depends testVisitWithoutEmbeddedVersion |
||
187 | */ |
||
188 | public function testContentTypeHrefCorrect(\DOMDocument $dom) |
||
192 | |||
193 | /** |
||
194 | * @param \DOMDocument $dom |
||
195 | * |
||
196 | * @depends testVisitWithoutEmbeddedVersion |
||
197 | */ |
||
198 | public function testContentTypeMediaTypeCorrect(\DOMDocument $dom) |
||
202 | |||
203 | /** |
||
204 | * @param \DOMDocument $dom |
||
205 | * |
||
206 | * @depends testVisitWithoutEmbeddedVersion |
||
207 | */ |
||
208 | public function testNameCorrect(\DOMDocument $dom) |
||
212 | |||
213 | /** |
||
214 | * @param \DOMDocument $dom |
||
215 | * |
||
216 | * @depends testVisitWithoutEmbeddedVersion |
||
217 | */ |
||
218 | public function testTranslatedNameCorrect(\DOMDocument $dom) |
||
222 | |||
223 | /** |
||
224 | * @param \DOMDocument $dom |
||
225 | * |
||
226 | * @depends testVisitWithoutEmbeddedVersion |
||
227 | */ |
||
228 | public function testVersionsHrefCorrect(\DOMDocument $dom) |
||
232 | |||
233 | /** |
||
234 | * @param \DOMDocument $dom |
||
235 | * |
||
236 | * @depends testVisitWithoutEmbeddedVersion |
||
237 | */ |
||
238 | public function testVersionsMediaTypeCorrect(\DOMDocument $dom) |
||
242 | |||
243 | /** |
||
244 | * @param \DOMDocument $dom |
||
245 | * |
||
246 | * @depends testVisitWithoutEmbeddedVersion |
||
247 | */ |
||
248 | public function testCurrentVersionHrefCorrect(\DOMDocument $dom) |
||
252 | |||
253 | /** |
||
254 | * @param \DOMDocument $dom |
||
255 | * |
||
256 | * @depends testVisitWithoutEmbeddedVersion |
||
257 | */ |
||
258 | public function testCurrentVersionMediaTypeCorrect(\DOMDocument $dom) |
||
262 | |||
263 | /** |
||
264 | * @param \DOMDocument $dom |
||
265 | * |
||
266 | * @depends testVisitWithoutEmbeddedVersion |
||
267 | */ |
||
268 | public function testSectionHrefCorrect(\DOMDocument $dom) |
||
272 | |||
273 | /** |
||
274 | * @param \DOMDocument $dom |
||
275 | * |
||
276 | * @depends testVisitWithoutEmbeddedVersion |
||
277 | */ |
||
278 | public function testSectionMediaTypeCorrect(\DOMDocument $dom) |
||
282 | |||
283 | /** |
||
284 | * @param \DOMDocument $dom |
||
285 | * |
||
286 | * @depends testVisitWithoutEmbeddedVersion |
||
287 | */ |
||
288 | public function testMainLocationHrefCorrect(\DOMDocument $dom) |
||
292 | |||
293 | /** |
||
294 | * @param \DOMDocument $dom |
||
295 | * |
||
296 | * @depends testVisitWithoutEmbeddedVersion |
||
297 | */ |
||
298 | public function testMainLocationMediaTypeCorrect(\DOMDocument $dom) |
||
302 | |||
303 | /** |
||
304 | * @param \DOMDocument $dom |
||
305 | * |
||
306 | * @depends testVisitWithoutEmbeddedVersion |
||
307 | */ |
||
308 | public function testLocationsHrefCorrect(\DOMDocument $dom) |
||
312 | |||
313 | /** |
||
314 | * @param \DOMDocument $dom |
||
315 | * |
||
316 | * @depends testVisitWithoutEmbeddedVersion |
||
317 | */ |
||
318 | public function testLocationsMediaTypeCorrect(\DOMDocument $dom) |
||
322 | |||
323 | /** |
||
324 | * @param \DOMDocument $dom |
||
325 | * |
||
326 | * @depends testVisitWithoutEmbeddedVersion |
||
327 | */ |
||
328 | public function testOwnerHrefCorrect(\DOMDocument $dom) |
||
332 | |||
333 | /** |
||
334 | * @param \DOMDocument $dom |
||
335 | * |
||
336 | * @depends testVisitWithoutEmbeddedVersion |
||
337 | */ |
||
338 | public function testOwnerMediaTypeCorrect(\DOMDocument $dom) |
||
342 | |||
343 | /** |
||
344 | * @param \DOMDocument $dom |
||
345 | * |
||
346 | * @depends testVisitWithoutEmbeddedVersion |
||
347 | */ |
||
348 | public function testLastModificationDateCorrect(\DOMDocument $dom) |
||
352 | |||
353 | /** |
||
354 | * @param \DOMDocument $dom |
||
355 | * |
||
356 | * @depends testVisitWithoutEmbeddedVersion |
||
357 | */ |
||
358 | public function testMainLanguageCodeCorrect(\DOMDocument $dom) |
||
362 | |||
363 | /** |
||
364 | * @param \DOMDocument $dom |
||
365 | * |
||
366 | * @depends testVisitWithoutEmbeddedVersion |
||
367 | */ |
||
368 | public function testCurrentVersionNoCorrect(\DOMDocument $dom) |
||
372 | |||
373 | /** |
||
374 | * @param \DOMDocument $dom |
||
375 | * |
||
376 | * @depends testVisitWithoutEmbeddedVersion |
||
377 | */ |
||
378 | public function testAlwaysAvailableCorrect(\DOMDocument $dom) |
||
382 | |||
383 | /** |
||
384 | * @param \DOMDocument $dom |
||
385 | * |
||
386 | * @depends testVisitWithoutEmbeddedVersion |
||
387 | */ |
||
388 | public function testIsHiddenCorrect(\DOMDocument $dom) |
||
392 | |||
393 | /** |
||
394 | * @param \DOMDocument $dom |
||
395 | * |
||
396 | * @depends testVisitWithoutEmbeddedVersion |
||
397 | */ |
||
398 | public function testStatusCorrect(\DOMDocument $dom) |
||
402 | |||
403 | /** |
||
404 | * @return \DOMDocument |
||
405 | */ |
||
406 | public function testVisitWithEmbeddedVersion() |
||
486 | |||
487 | /** |
||
488 | * @param \DOMDocument $dom |
||
489 | * |
||
490 | * @depends testVisitWithEmbeddedVersion |
||
491 | */ |
||
492 | public function testContentMediaTypeWithVersionCorrect(\DOMDocument $dom) |
||
496 | |||
497 | /** |
||
498 | * @param \DOMDocument $dom |
||
499 | * |
||
500 | * @depends testVisitWithEmbeddedVersion |
||
501 | */ |
||
502 | public function testEmbeddedCurrentVersionHrefCorrect(\DOMDocument $dom) |
||
506 | |||
507 | /** |
||
508 | * @param \DOMDocument $dom |
||
509 | * |
||
510 | * @depends testVisitWithEmbeddedVersion |
||
511 | */ |
||
512 | public function testEmbeddedCurrentVersionMediaTypeCorrect(\DOMDocument $dom) |
||
516 | |||
517 | /** |
||
518 | * Get the Content visitor. |
||
519 | * |
||
520 | * @return \eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestContent |
||
521 | */ |
||
522 | protected function internalGetVisitor() |
||
528 | } |
||
529 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.