1 | <?php |
||
18 | class ResponseTest extends \PHPUnit_Framework_TestCase |
||
19 | { |
||
20 | |||
21 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
22 | /** ++++++++++++++ TESTS ++++++++++++++ **/ |
||
23 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
24 | |||
25 | /** |
||
26 | * Test status can be imported. |
||
27 | * |
||
28 | * @access public |
||
29 | * @return void |
||
30 | */ |
||
31 | public function testStatusCanBeImported() |
||
42 | |||
43 | /** |
||
44 | * Test content can be imported |
||
45 | * |
||
46 | * @access public |
||
47 | * @return void |
||
48 | */ |
||
49 | public function testContentCanBeImported() |
||
60 | |||
61 | /** |
||
62 | * Test content type can be imported. |
||
63 | * |
||
64 | * @access public |
||
65 | * @return void |
||
66 | */ |
||
67 | public function testContentTypeCanBeImported() |
||
78 | |||
79 | /** |
||
80 | * Test URL can be imported. |
||
81 | * |
||
82 | * @access public |
||
83 | * @return void |
||
84 | */ |
||
85 | public function testUrlCanBeImported() |
||
96 | |||
97 | /** |
||
98 | * Test redirect URL can be imported. |
||
99 | * |
||
100 | * @access public |
||
101 | * @return void |
||
102 | */ |
||
103 | public function testRedirectUrlCanBeImported() |
||
114 | |||
115 | /** |
||
116 | * Test time can be imported. |
||
117 | * |
||
118 | * @access public |
||
119 | * @return void |
||
120 | */ |
||
121 | public function testTimeCanBeImported() |
||
132 | |||
133 | /** |
||
134 | * Test headers can be imported. |
||
135 | * |
||
136 | * @access public |
||
137 | * @return void |
||
138 | */ |
||
139 | public function testHeadersCanBeImported() |
||
161 | |||
162 | /** |
||
163 | * Test null is returned if header is not set. |
||
164 | * |
||
165 | * @access public |
||
166 | * @return void |
||
167 | */ |
||
168 | public function testNullIsReturnedIfHeaderIsNotSet() |
||
174 | |||
175 | /** |
||
176 | * Test can get header. |
||
177 | * |
||
178 | * @access public |
||
179 | * @return void |
||
180 | */ |
||
181 | public function testCanGetHeader() |
||
199 | |||
200 | /** |
||
201 | * Test is redirect if status code |
||
202 | * is 300. |
||
203 | * |
||
204 | * @access public |
||
205 | * @return void |
||
206 | */ |
||
207 | public function testIsRedirectIfStatusCodeIs300() |
||
218 | |||
219 | /** |
||
220 | * Test is redirect if status code |
||
221 | * is 301. |
||
222 | * |
||
223 | * @access public |
||
224 | * @return void |
||
225 | */ |
||
226 | public function testIsRedirectIfStatusCodeIs301() |
||
237 | |||
238 | /** |
||
239 | * Test is redirect if status code |
||
240 | * is 302. |
||
241 | * |
||
242 | * @access public |
||
243 | * @return void |
||
244 | */ |
||
245 | public function testIsRedirectIfStatusCodeIs302() |
||
256 | |||
257 | /** |
||
258 | * Test is redirect if status code |
||
259 | * is 303. |
||
260 | * |
||
261 | * @access public |
||
262 | * @return void |
||
263 | */ |
||
264 | public function testIsRedirectIfStatusCodeIs303() |
||
275 | |||
276 | /** |
||
277 | * Test is redirect if status code |
||
278 | * is 304. |
||
279 | * |
||
280 | * @access public |
||
281 | * @return void |
||
282 | */ |
||
283 | public function testIsRedirectIfStatusCodeIs304() |
||
294 | |||
295 | /** |
||
296 | * Test is redirect if status code |
||
297 | * is 305. |
||
298 | * |
||
299 | * @access public |
||
300 | * @return void |
||
301 | */ |
||
302 | public function testIsRedirectIfStatusCodeIs305() |
||
313 | |||
314 | /** |
||
315 | * Test is redirect if status code |
||
316 | * is 306. |
||
317 | * |
||
318 | * @access public |
||
319 | * @return void |
||
320 | */ |
||
321 | public function testIsRedirectIfStatusCodeIs306() |
||
332 | |||
333 | /** |
||
334 | * Test is redirect if status code |
||
335 | * is 307. |
||
336 | * |
||
337 | * @access public |
||
338 | * @return void |
||
339 | */ |
||
340 | public function testIsRedirectIfStatusCodeIs307() |
||
351 | |||
352 | /** |
||
353 | * Test is not redirect if status code is |
||
354 | * not redirect. |
||
355 | * |
||
356 | * @access public |
||
357 | * @return void |
||
358 | */ |
||
359 | public function testIsNotRedirectIfStatusCodeIsNotRedirect() |
||
370 | |||
371 | /** |
||
372 | * Test if cookies can be parsed and imported |
||
373 | * |
||
374 | * @access public |
||
375 | * @return void |
||
376 | */ |
||
377 | public function testCookiesCanBeImported() |
||
389 | |||
390 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
391 | /** ++++++++++ TEST ENTITIES ++++++++++ **/ |
||
392 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
393 | |||
394 | /** |
||
395 | * Get response instance. |
||
396 | * |
||
397 | * @access protected |
||
398 | * @return \JonnyW\PhantomJs\Http\Response |
||
399 | */ |
||
400 | protected function getResponse() |
||
406 | } |
||
407 |