File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55use GuzzleHttp \Psr7 \Uri ;
66use Saloon \Http \Faking \MockClient ;
77use Saloon \Http \Faking \MockResponse ;
8- use Saloon \Tests \Fixtures \Requests \ ModifiedPsrUserRequest ;
8+ use Saloon \Tests \Fixtures \Connectors \ TestConnector ;
99use Saloon \Tests \Fixtures \Requests \NullHeaderRequest ;
10+ use Saloon \Tests \Fixtures \Requests \ModifiedPsrUserRequest ;
1011use Saloon \Tests \Fixtures \Connectors \ModifiedPsrRequestConnector ;
11- use Saloon \Tests \Fixtures \Connectors \TestConnector ;
1212
1313test ('the connector and request can modify the psr request when it is created ' , function () {
1414 $ mockClient = new MockClient ([
2929 expect ($ response ->getPsrRequest ()->getHeaders ())->toHaveKey ('X-Howdy ' , ['Yeehaw ' ]);
3030});
3131
32- test ('The psr request and readers must be converted to empty string ' , function () {
32+ test ('The psr request headers must be converted to empty string ' , function () {
3333 $ mockClient = new MockClient ([
3434 MockResponse::make (headers: ['X-Null-Header ' => null ]),
3535 ]);
4242 // The request will convert null to empty string
4343 expect ($ response ->getPsrRequest ()->getHeader ('X-Null-Header ' )[0 ])->toBe ('' );
4444
45- // The responde will convert null header to empty string
45+ // The response will convert null header to empty string
4646 expect ($ response ->headers ()->get ('X-Null-Header ' ))->toBe ('' );
4747});
Original file line number Diff line number Diff line change @@ -30,11 +30,4 @@ protected function defaultHeaders(): array
3030 'X-Null-Header ' => null ,
3131 ];
3232 }
33-
34- protected function defaultConfig (): array
35- {
36- return [
37- 'timeout ' => 5 ,
38- ];
39- }
4033}
You can’t perform that action at this time.
0 commit comments