From 3c58e47ad207c08f37530e7aa5ab1b2812216813 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 6 Oct 2024 12:32:26 +0200 Subject: [PATCH] fix tests The data provider was depending on the openssl extension being present. --- .../Component/HttpClient/Tests/HttpClientTraitTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php index 0b92e1d69dd76..2e7a166a45600 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php @@ -122,7 +122,7 @@ public function testNormalizeBodyMultipart() public function testNormalizeBodyMultipartForwardStream($stream) { $body = [ - 'logo' => $stream, + 'logo' => $stream(), ]; $headers = []; @@ -153,8 +153,8 @@ public function testNormalizeBodyMultipartForwardStream($stream) public static function provideNormalizeBodyMultipartForwardStream() { - yield 'native' => [fopen('https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png', 'r')]; - yield 'symfony' => [HttpClient::create()->request('GET', 'https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png')->toStream()]; + yield 'native' => [static fn () => fopen('https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png', 'r')]; + yield 'symfony' => [static fn () => HttpClient::create()->request('GET', 'https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png')->toStream()]; } /**