diff --git a/composer.json b/composer.json index 5403975..f2dbca5 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "amphp/amp": "^3.1", "amphp/http-client": "^5.3", "amphp/http-client-psr7": "^1.1", - "guzzlehttp/psr7": "^2.6", + "guzzlehttp/psr7": "^2.6 || ^3.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^2.0", diff --git a/tests/Client/Http/RequestFactoryTest.php b/tests/Client/Http/RequestFactoryTest.php index abc946a..35be86e 100644 --- a/tests/Client/Http/RequestFactoryTest.php +++ b/tests/Client/Http/RequestFactoryTest.php @@ -17,8 +17,6 @@ use SimPod\ClickHouseClient\Settings\EmptySettingsProvider; use SimPod\ClickHouseClient\Tests\TestCaseBase; -use function implode; - #[CoversClass(RequestFactory::class)] final class RequestFactoryTest extends TestCaseBase { @@ -98,16 +96,9 @@ public function testParamParsed(): void $body = $request->getBody()->__toString(); self::assertStringContainsString('param_p1', $body); - self::assertStringContainsString( - implode( - "\r\n", - [ - 'Content-Disposition: form-data; name="param_p_2"', - 'Content-Length: 10', - '', - $now->getTimestamp(), - ], - ), + self::assertMatchesRegularExpression( + '~Content-Disposition: form-data; name="param_p_2"\r\n(?:Content-Length: \d+\r\n)?\r\n' + . $now->getTimestamp() . '~', $body, ); }