You are here

protected function OEmbedTestTrait::useFixtureProviders in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::useFixtureProviders()
  2. 10 core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::useFixtureProviders()

Forces Media to use the provider database in the fixtures directory.

2 calls to OEmbedTestTrait::useFixtureProviders()
ResourceFetcherTest::setUp in core/modules/media/tests/src/Functional/ResourceFetcherTest.php
UrlResolverTest::setUp in core/modules/media/tests/src/Functional/UrlResolverTest.php

File

core/modules/media/tests/src/Traits/OEmbedTestTrait.php, line 35

Class

OEmbedTestTrait
Contains helper functions for testing oEmbed functionality in isolation.

Namespace

Drupal\Tests\media\Traits

Code

protected function useFixtureProviders() {
  $this
    ->config('media.settings')
    ->set('oembed_providers_url', $this
    ->getFixturesUrl() . '/providers.json')
    ->save();
}