function ViewsSettingsRenameTest::testRenameViewsSettings

Tests upgrading views settings.

@covers \views_post_update_rename_default_display_setting

File

core/modules/views/tests/src/Functional/Update/ViewsSettingsRenameTest.php, line 33

Class

ViewsSettingsRenameTest
Tests renaming views module's configuration.

Namespace

Drupal\Tests\views\Functional\Update

Code

public function testRenameViewsSettings() {
    $config = $this->config('views.settings')
        ->get('ui.show');
    $this->assertArrayHasKey('master_display', $config);
    $this->assertArrayNotHasKey('default_display', $config);
    $this->assertFalse($config['master_display']);
    // Run updates.
    $this->runUpdates();
    $config = $this->config('views.settings')
        ->get('ui.show');
    $this->assertArrayHasKey('default_display', $config);
    $this->assertArrayNotHasKey('master_display', $config);
    $this->assertFalse($config['default_display']);
}

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