|
21 | 21 |
|
22 | 22 | use function chillerlan\HTTP\Psr17\create_stream; |
23 | 23 | use function chillerlan\HTTP\Psr7\get_json; |
24 | | -use function strlen, strtolower; |
| 24 | +use function str_repeat, strlen, strtolower; |
25 | 25 |
|
26 | 26 | class CurlHandleTest extends TestCase{ |
27 | 27 |
|
@@ -103,7 +103,6 @@ public function testRequestMethodsWithFormBody(string $method){ |
103 | 103 | try{ |
104 | 104 | $url = 'https://httpbin.org/'.strtolower($method); |
105 | 105 | $body = 'foo=bar'; |
106 | | - |
107 | 106 | $request = $this->requestFactory->createRequest($method, $url) |
108 | 107 | ->withHeader('Content-type', 'x-www-form-urlencoded') |
109 | 108 | ->withHeader('Content-Length', strlen($body)) |
@@ -140,7 +139,6 @@ public function testRequestMethodsWithJsonBody(string $method){ |
140 | 139 | try{ |
141 | 140 | $url = 'https://httpbin.org/'.strtolower($method); |
142 | 141 | $body = '{"foo":"bar"}'; |
143 | | - |
144 | 142 | $request = $this->requestFactory->createRequest($method, $url) |
145 | 143 | ->withHeader('Content-type', 'application/json') |
146 | 144 | ->withBody(create_stream($body)) |
@@ -170,8 +168,7 @@ public function testRequestMethodsWithJsonBody(string $method){ |
170 | 168 | public function testLargeBody(){ |
171 | 169 |
|
172 | 170 | try{ |
173 | | - $body = \str_repeat('*', (1 << 20) + 1); |
174 | | - |
| 171 | + $body = str_repeat('*', (1 << 20) + 1); |
175 | 172 | $request = $this->requestFactory->createRequest('POST', 'https://httpbin.org/post') |
176 | 173 | ->withHeader('Content-type', 'text/plain') |
177 | 174 | ->withHeader('Content-Length', strlen($body)) |
|
0 commit comments