1 | <?php |
||
10 | final class HttpTest extends TestCase |
||
11 | { |
||
12 | /** |
||
13 | * @test |
||
14 | * @group unit |
||
15 | * @covers ::parseHeaders |
||
16 | * |
||
17 | * @return void |
||
18 | */ |
||
19 | public function parseHeadersBasicUsage() |
||
25 | |||
26 | /** |
||
27 | * @test |
||
28 | * @group unit |
||
29 | * @covers ::parseHeaders |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | public function parseHeadersMalformed() |
||
43 | |||
44 | /** |
||
45 | * Verifies parseHeaders retains the functionality of http_parse_headers() |
||
46 | * |
||
47 | * @test |
||
48 | * @group unit |
||
49 | * @covers ::parseHeaders |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | public function parseHeadersPeclHttpFunctionality() |
||
73 | |||
74 | /** |
||
75 | * Verifies Request Method and Request Url are set properly |
||
76 | * |
||
77 | * @test |
||
78 | * @group unit |
||
79 | * @covers ::parseHeaders |
||
80 | * |
||
81 | * @return void |
||
82 | */ |
||
83 | public function parseHeadersMethodAndUrlSet() |
||
99 | |||
100 | /** |
||
101 | * @test |
||
102 | * @covers ::buildQueryString |
||
103 | * |
||
104 | * @return void |
||
105 | */ |
||
106 | public function buildQueryStringBasicUse() |
||
122 | |||
123 | /** |
||
124 | * @test |
||
125 | * @covers ::buildQueryString |
||
126 | * |
||
127 | * @return void |
||
128 | */ |
||
129 | public function buildQueryStringMultiValue() |
||
135 | |||
136 | /** |
||
137 | * @test |
||
138 | * @covers ::buildQueryString |
||
139 | * |
||
140 | * @return void |
||
141 | */ |
||
142 | public function buildQueryStringComplexValues() |
||
149 | |||
150 | /** |
||
151 | * Verifies Multi Parameter Method can handle a normal url |
||
152 | * |
||
153 | * @test |
||
154 | * @group unit |
||
155 | * @covers ::getQueryParams |
||
156 | * |
||
157 | * @return void |
||
158 | */ |
||
159 | public function getQueryParamsNormal() |
||
171 | |||
172 | /** |
||
173 | * Verifies Multi Parameter Method can handle a url with an empty parameter |
||
174 | * |
||
175 | * @test |
||
176 | * @group unit |
||
177 | * @covers ::getQueryParams |
||
178 | * |
||
179 | * @return void |
||
180 | */ |
||
181 | public function getQueryParamsEmptyParameter() |
||
192 | |||
193 | /** |
||
194 | * Verifies multi parameter method with a garbage query string |
||
195 | * |
||
196 | * @test |
||
197 | * @group unit |
||
198 | * @covers ::getQueryParams |
||
199 | * |
||
200 | * @return void |
||
201 | */ |
||
202 | public function getQueryParamsGarbage() |
||
206 | |||
207 | /** |
||
208 | * @test |
||
209 | * @covers ::getQueryParams |
||
210 | * |
||
211 | * @return void |
||
212 | */ |
||
213 | public function getQueryParamsWithCollapsed() |
||
218 | |||
219 | /** |
||
220 | * @test |
||
221 | * @covers ::getQueryParams |
||
222 | * @expectedException \Exception |
||
223 | * @expectedExceptionMessage Parameter 'stuff' had more than one value but in $collapsedParams |
||
224 | * |
||
225 | * @return void |
||
226 | */ |
||
227 | public function getQueryParamsCollapsedMoreThanOneValue() |
||
231 | |||
232 | /** |
||
233 | * @test |
||
234 | * @covers ::getQueryParamsCollapsed |
||
235 | * |
||
236 | * @return void |
||
237 | */ |
||
238 | public function getQueryParamsCollapsed() |
||
244 | |||
245 | /** |
||
246 | * @test |
||
247 | * @covers ::getQueryParamsCollapsed |
||
248 | * @expectedException \Exception |
||
249 | * @expectedExceptionMessage Parameter 'boo' is not expected to be an array, but array given |
||
250 | * |
||
251 | * @return void |
||
252 | */ |
||
253 | public function getQueryParamsCollapsedUnexpectedArray() |
||
258 | |||
259 | /** |
||
260 | * Verifies multi parameter method with a garbage query string |
||
261 | * |
||
262 | * @test |
||
263 | * @covers ::getQueryParamsCollapsed |
||
264 | * |
||
265 | * @return void |
||
266 | */ |
||
267 | public function getQueryParamsCollapsedGarbage() |
||
271 | |||
272 | /** |
||
273 | * Verifies Multi Parameter Method can handle a url with an empty parameter |
||
274 | * |
||
275 | * @test |
||
276 | * @covers ::getQueryParamsCollapsed |
||
277 | * |
||
278 | * @return void |
||
279 | */ |
||
280 | public function getQueryParamsCollapsedEmptyParameter() |
||
286 | } |
||
287 |