From 0127852850ea04588eeccf631510882837869a69 Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Thu, 24 Jun 2021 12:55:48 +1000 Subject: [PATCH] Issue #3220450 by xjm, phenaproxima: OEmbed ProviderRepositoryTest::testEmptyProviderList() does not interact with Guzzle's API correctly (cherry picked from commit 2c57cbec9af98e3cbb21e5c5cb1a54e7bfcaf09c) --- .../media/tests/src/Functional/ProviderRepositoryTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php index 8c583e4ba5a..2e81efc6b78 100644 --- a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php +++ b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\media\Functional; use Drupal\media\OEmbed\ProviderException; +use GuzzleHttp\Psr7\Utils; /** * Tests the oEmbed provider repository. @@ -28,7 +29,7 @@ class ProviderRepositoryTest extends MediaFunctionalTestBase { */ public function testEmptyProviderList($content) { $response = $this->prophesize('\GuzzleHttp\Psr7\Response'); - $response->getBody()->willReturn($content); + $response->getBody()->willReturn(Utils::streamFor($content)); $client = $this->createMock('\GuzzleHttp\Client'); $client->method('request')->withAnyParameters()->willReturn($response->reveal());