You are here

public function MediaUpdateTest::testOEmbedConfig in Drupal 8

Tests that media.settings config is updated with oEmbed configuration.

See also

media_update_8600()

File

core/modules/media/tests/src/Functional/Update/MediaUpdateTest.php, line 57

Class

MediaUpdateTest
Tests that media settings are properly updated during database updates.

Namespace

Drupal\Tests\media\Functional\Update

Code

public function testOEmbedConfig() {
  $config = $this
    ->config('media.settings');
  $this
    ->assertNull($config
    ->get('oembed_providers_url'));
  $this
    ->assertNull($config
    ->get('iframe_domain'));
  $this
    ->runUpdates();
  $config = $this
    ->config('media.settings');
  $this
    ->assertSame('https://oembed.com/providers.json', $config
    ->get('oembed_providers_url'));
  $this
    ->assertSame('', $config
    ->get('iframe_domain'));
}