function OEmbedTestTrait::useFixtureProviders

Same name in other branches
  1. 9 core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::useFixtureProviders()
  2. 8.9.x core/modules/media/tests/src/Traits/OEmbedTestTrait.php \Drupal\Tests\media\Traits\OEmbedTestTrait::useFixtureProviders()
  3. 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 37

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

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