function ResourceFetcherTest::testDeprecations

@covers ::__construct

@group legacy

File

core/modules/media/tests/src/Kernel/ResourceFetcherTest.php, line 20

Class

ResourceFetcherTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21media%21src%21OEmbed%21ResourceFetcher.php/class/ResourceFetcher/9" title="Fetches and caches oEmbed resources." class="local">\Drupal\media\OEmbed\ResourceFetcher</a>

Namespace

Drupal\Tests\media\Kernel

Code

public function testDeprecations() : void {
    $this->expectDeprecation('Passing NULL as the $cache_backend parameter to Drupal\\media\\OEmbed\\ResourceFetcher::__construct() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3223594');
    new ResourceFetcher($this->container
        ->get('http_client'), $this->createMock('\\Drupal\\media\\OEmbed\\ProviderRepositoryInterface'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.