|
21 | 21 | it('implements sendRequest', function () { |
22 | 22 | Http::fake(['*' => Http::response('foo=baz', 404, ['X-Foo' => 'Baz'])]); |
23 | 23 |
|
24 | | - $client = new Client(); |
| 24 | + $client = new Client; |
25 | 25 | $response = $client->sendRequest(new PsrRequest('POST', 'https://example.com', ['X-Foo' => 'Bar'], 'foo=bar')); |
26 | 26 |
|
27 | 27 | Http::assertSent(function (Request $request) { |
|
39 | 39 | it('implements send', function () { |
40 | 40 | Http::fake(['*' => Http::response('foo=baz', 404, ['X-Foo' => 'Baz'])]); |
41 | 41 |
|
42 | | - $client = new Client(); |
| 42 | + $client = new Client; |
43 | 43 | $response = $client->send(new PsrRequest('POST', 'https://example.com', ['X-Foo' => 'Bar'], 'foo=bar')); |
44 | 44 |
|
45 | 45 | Http::assertSent(function (Request $request) { |
|
57 | 57 | it('implements sendAsync', function () { |
58 | 58 | Http::fake(['*' => Http::response('foo=baz', 404, ['X-Foo' => 'Baz'])]); |
59 | 59 |
|
60 | | - $client = new Client(); |
| 60 | + $client = new Client; |
61 | 61 | $response = $client->sendAsync(new PsrRequest('POST', 'https://example.com', ['X-Foo' => 'Bar'], 'foo=bar'))->wait(); |
62 | 62 |
|
63 | 63 | Http::assertSent(function (Request $request) { |
|
75 | 75 | it('implements request', function () { |
76 | 76 | Http::fake(['*' => Http::response('foo=baz', 404, ['X-Foo' => 'Baz'])]); |
77 | 77 |
|
78 | | - $client = new Client(); |
| 78 | + $client = new Client; |
79 | 79 | $response = $client->request('POST', 'https://example.com', ['headers' => ['X-Foo' => 'Bar'], 'body' => 'foo=bar']); |
80 | 80 |
|
81 | 81 | Http::assertSent(function (Request $request) { |
|
93 | 93 | it('implements requestAsync', function () { |
94 | 94 | Http::fake(['*' => Http::response('foo=baz', 404, ['X-Foo' => 'Baz'])]); |
95 | 95 |
|
96 | | - $client = new Client(); |
| 96 | + $client = new Client; |
97 | 97 | $response = $client->requestAsync('POST', 'https://example.com', ['headers' => ['X-Foo' => 'Bar'], 'body' => 'foo=bar'])->wait(); |
98 | 98 |
|
99 | 99 | Http::assertSent(function (Request $request) { |
|
0 commit comments