ResourceFetcherTest.php

Same filename in this branch
  1. 9 core/modules/media/tests/src/Unit/ResourceFetcherTest.php
  2. 9 core/modules/media/tests/src/Functional/ResourceFetcherTest.php
Same filename and directory in other branches
  1. 8.9.x core/modules/media/tests/src/Functional/ResourceFetcherTest.php
  2. 10 core/modules/media/tests/src/Unit/ResourceFetcherTest.php
  3. 10 core/modules/media/tests/src/Functional/ResourceFetcherTest.php
  4. 11.x core/modules/media/tests/src/Unit/ResourceFetcherTest.php
  5. 11.x core/modules/media/tests/src/Functional/ResourceFetcherTest.php

Namespace

Drupal\Tests\media\Kernel

File

core/modules/media/tests/src/Kernel/ResourceFetcherTest.php

View source
<?php

namespace Drupal\Tests\media\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\media\OEmbed\ResourceFetcher;

/**
 * @coversDefaultClass \Drupal\media\OEmbed\ResourceFetcher
 *
 * @group media
 */
class ResourceFetcherTest extends KernelTestBase {
    
    /**
     * @covers ::__construct
     *
     * @group legacy
     */
    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'));
    }

}

Classes

Title Deprecated Summary
ResourceFetcherTest @coversDefaultClass \Drupal\media\OEmbed\ResourceFetcher

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