Issue #3220450 by xjm, phenaproxima: OEmbed ProviderRepositoryTest::testEmptyProviderList() does not interact with Guzzle's API correctly

(cherry picked from commit 2c57cbec9a)
merge-requests/860/head
Lee Rowlands 2021-06-24 12:55:48 +10:00
parent 0505e48cea
commit 0127852850
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
1 changed files with 2 additions and 1 deletions

View File

@ -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());