File tree Expand file tree Collapse file tree 2 files changed +1
-30
lines changed Expand file tree Collapse file tree 2 files changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ public function setFormType(string $form_type): self
156
156
*/
157
157
public function injectRequestHeader (array $ headers ): self
158
158
{
159
- $ this ->responseHeaders = $ headers ;
159
+ $ this ->requestHeaders = $ headers ;
160
160
return $ this ;
161
161
}
162
162
Original file line number Diff line number Diff line change @@ -180,33 +180,4 @@ public function testCallMultipartSuccess2(): void
180
180
$ r = json_decode ($ resp ->getBody ()->getContents ());
181
181
$ this ->assertEquals ('101 ' , $ r ->id );
182
182
}
183
-
184
- public function testCallMultipartSuccess3 (): void
185
- {
186
- $ request = new Request (
187
- 'POST ' ,
188
- 'https://jsonplaceholder.typicode.com/posts ' ,
189
- );
190
- $ f = fopen ('public/docs/hello.txt ' , 'w ' );
191
- fwrite ($ f , 'hello world ' );
192
- fclose ($ f );
193
- $ f = fopen ('public/docs/hello2.txt ' , 'w ' );
194
- fwrite ($ f , 'spotlibs the php library ' );
195
- fclose ($ f );
196
- $ x = [];
197
- array_push ($ x , new \Illuminate \Http \UploadedFile ('public/docs/hello.txt ' , 'hello.txt ' ));
198
- array_push ($ x , new \Illuminate \Http \UploadedFile ('public/docs/hello.txt ' , 'hello2.txt ' ));
199
- $ client = new Client ();
200
- $ resp = $ client ->setFormType (RequestOptions::MULTIPART )
201
- ->setRequestBody ([
202
- new Multipart ([
203
- 'name ' => 'file[] ' ,
204
- 'contents ' => $ x
205
- ])
206
- ])
207
- ->setVerify (true )
208
- ->call ($ request );
209
- $ r = json_decode ($ resp ->getBody ()->getContents ());
210
- $ this ->assertEquals ('101 ' , $ r ->id );
211
- }
212
183
}
You can’t perform that action at this time.
0 commit comments