function MediaUpdateTest::testOEmbedConfig

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

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