You are here

public function CdnStreamWrapperSettingsUpdateTest::testStreamWrapperSettingsAdded in CDN 8.3

Tests default settings can be detected, and are updated.

It's possible to automatically update the settings as long as the only thing that's modified by the end user is the 'domain' (NULL by default).

File

tests/src/Functional/Update/CdnStreamWrapperSettingsUpdateTest.php, line 34

Class

CdnStreamWrapperSettingsUpdateTest
Tests that existing sites also get the new stream wrappers setting.

Namespace

Drupal\Tests\cdn\Functional\Update

Code

public function testStreamWrapperSettingsAdded() {

  // Make sure we have the expected values before the update.
  $cdn_settings = $this
    ->config('cdn.settings');
  $this
    ->assertNull($cdn_settings
    ->get('stream_wrappers'));
  $this
    ->runUpdates();

  // Make sure we have the expected values after the update.
  $cdn_settings = $this
    ->config('cdn.settings');
  $this
    ->assertSame([
    'public',
  ], $cdn_settings
    ->get('stream_wrappers'));
}