|
68 | 68 |
|
69 | 69 | fetch('https://example.com', [ |
70 | 70 | 'method' => 'POST', |
71 | | - 'body' => $body, |
| 71 | + 'body' => $body, |
72 | 72 | 'client' => $this->mockClient, |
73 | 73 | ]); |
74 | 74 |
|
|
84 | 84 |
|
85 | 85 | fetch('endpoint', [ |
86 | 86 | 'base_uri' => 'https://api.example.com/', |
87 | | - 'client' => $this->mockClient, |
| 87 | + 'client' => $this->mockClient, |
88 | 88 | ]); |
89 | 89 |
|
90 | 90 | expect($this->historyContainer)->toHaveCount(1); |
|
98 | 98 |
|
99 | 99 | fetch('/endpoint', [ |
100 | 100 | 'base_uri' => 'https://api.example.com', |
101 | | - 'client' => $this->mockClient, |
| 101 | + 'client' => $this->mockClient, |
102 | 102 | ]); |
103 | 103 |
|
104 | 104 | expect($this->historyContainer)->toHaveCount(1); |
|
180 | 180 |
|
181 | 181 | fetch('https://example.com', [ |
182 | 182 | 'method' => 'POST', |
183 | | - 'body' => ['data' => 'value'], |
| 183 | + 'body' => ['data' => 'value'], |
184 | 184 | 'client' => $this->mockClient, |
185 | 185 | ]); |
186 | 186 |
|
|
191 | 191 |
|
192 | 192 | fetch('https://example.com', [ |
193 | 193 | 'method' => 'PUT', |
194 | | - 'body' => ['data' => 'updated'], |
| 194 | + 'body' => ['data' => 'updated'], |
195 | 195 | 'client' => $this->mockClient, |
196 | 196 | ]); |
197 | 197 |
|
198 | 198 | fetch('https://example.com', [ |
199 | 199 | 'method' => 'PATCH', |
200 | | - 'body' => ['data' => 'patched'], |
| 200 | + 'body' => ['data' => 'patched'], |
201 | 201 | 'client' => $this->mockClient, |
202 | 202 | ]); |
203 | 203 |
|
|
218 | 218 | $this->mockHandler->append(new GuzzleResponse(200)); |
219 | 219 |
|
220 | 220 | fetch('https://example.com', [ |
221 | | - 'method' => 'POST', |
| 221 | + 'method' => 'POST', |
222 | 222 | 'form_params' => ['username' => 'test', 'password' => 'secret'], |
223 | | - 'client' => $this->mockClient, |
| 223 | + 'client' => $this->mockClient, |
224 | 224 | ]); |
225 | 225 |
|
226 | 226 | expect($this->historyContainer)->toHaveCount(1); |
|
237 | 237 | $this->mockHandler->append(new GuzzleResponse(200)); |
238 | 238 |
|
239 | 239 | fetch('https://example.com', [ |
240 | | - 'query' => ['page' => 1, 'limit' => 10], |
| 240 | + 'query' => ['page' => 1, 'limit' => 10], |
241 | 241 | 'client' => $this->mockClient, |
242 | 242 | ]); |
243 | 243 |
|
|
257 | 257 | fetch('https://example.com', [ |
258 | 258 | 'headers' => [ |
259 | 259 | 'X-API-Key' => 'abc123', |
260 | | - 'Accept' => 'application/json', |
| 260 | + 'Accept' => 'application/json', |
261 | 261 | ], |
262 | 262 | 'client' => $this->mockClient, |
263 | 263 | ]); |
|
274 | 274 |
|
275 | 275 | fetch('https://example.com', [ |
276 | 276 | 'timeout' => 15, |
277 | | - 'client' => $this->mockClient, |
| 277 | + 'client' => $this->mockClient, |
278 | 278 | ]); |
279 | 279 |
|
280 | 280 | expect($this->historyContainer)->toHaveCount(1); |
|
331 | 331 | $this->mockHandler->append(new GuzzleResponse(200)); |
332 | 332 |
|
333 | 333 | fetch('https://example.com', [ |
334 | | - 'method' => 'POST', |
335 | | - 'body' => ['name' => 'test'], |
| 334 | + 'method' => 'POST', |
| 335 | + 'body' => ['name' => 'test'], |
336 | 336 | 'headers' => ['X-Custom' => 'value'], |
337 | 337 | 'timeout' => 30, |
338 | | - 'query' => ['debug' => 1], |
339 | | - 'client' => $this->mockClient, |
| 338 | + 'query' => ['debug' => 1], |
| 339 | + 'client' => $this->mockClient, |
340 | 340 | ]); |
341 | 341 |
|
342 | 342 | expect($this->historyContainer)->toHaveCount(1); |
|
0 commit comments