Skip to content

Commit ef9533b

Browse files
committed
🚿
1 parent c90bfd9 commit ef9533b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/CurlUtils/CurlHandleTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
use function chillerlan\HTTP\Psr17\create_stream;
2323
use function chillerlan\HTTP\Psr7\get_json;
24-
use function strlen, strtolower;
24+
use function str_repeat, strlen, strtolower;
2525

2626
class CurlHandleTest extends TestCase{
2727

@@ -103,7 +103,6 @@ public function testRequestMethodsWithFormBody(string $method){
103103
try{
104104
$url = 'https://httpbin.org/'.strtolower($method);
105105
$body = 'foo=bar';
106-
107106
$request = $this->requestFactory->createRequest($method, $url)
108107
->withHeader('Content-type', 'x-www-form-urlencoded')
109108
->withHeader('Content-Length', strlen($body))
@@ -140,7 +139,6 @@ public function testRequestMethodsWithJsonBody(string $method){
140139
try{
141140
$url = 'https://httpbin.org/'.strtolower($method);
142141
$body = '{"foo":"bar"}';
143-
144142
$request = $this->requestFactory->createRequest($method, $url)
145143
->withHeader('Content-type', 'application/json')
146144
->withBody(create_stream($body))
@@ -170,8 +168,7 @@ public function testRequestMethodsWithJsonBody(string $method){
170168
public function testLargeBody(){
171169

172170
try{
173-
$body = \str_repeat('*', (1 << 20) + 1);
174-
171+
$body = str_repeat('*', (1 << 20) + 1);
175172
$request = $this->requestFactory->createRequest('POST', 'https://httpbin.org/post')
176173
->withHeader('Content-type', 'text/plain')
177174
->withHeader('Content-Length', strlen($body))

0 commit comments

Comments
 (0)