function ViewsConfigUpdaterTest::testUpdateAll

Same name and namespace in other branches
  1. 8.9.x core/modules/views/tests/src/Kernel/ViewsConfigUpdaterTest.php \Drupal\Tests\views\Kernel\ViewsConfigUpdaterTest::testUpdateAll()

@covers ::updateAll

File

core/modules/views/tests/src/Kernel/ViewsConfigUpdaterTest.php, line 153

Class

ViewsConfigUpdaterTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21views%21src%21ViewsConfigUpdater.php/class/ViewsConfigUpdater/9" title="Provides a BC layer for modules providing old configurations." class="local">\Drupal\views\ViewsConfigUpdater</a>

Namespace

Drupal\Tests\views\Kernel

Code

public function testUpdateAll() {
    $this->expectDeprecation('The entity link url update for the "node_link_update_test" view is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Module-provided Views configuration should be updated to accommodate the changes described at https://www.drupal.org/node/2857891.');
    $this->expectDeprecation('The operator defaults update for the "test_exposed_filters" view is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Module-provided Views configuration should be updated to accommodate the changes described at https://www.drupal.org/node/2869168.');
    $this->expectDeprecation('The multivalue base field update for the "test_user_multi_value" view is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Module-provided Views configuration should be updated to accommodate the changes described at https://www.drupal.org/node/2900684.');
    $view_ids = [
        'views.view.node_link_update_test',
        'views.view.test_exposed_filters',
        'views.view.test_user_multi_value',
    ];
    foreach ($view_ids as $view_id) {
        $test_view = $this->loadTestView($view_id);
        $this->assertTrue($this->configUpdater
            ->updateAll($test_view), "View {$view_id} should be updated.");
    }
    // @todo Improve this in https://www.drupal.org/node/3121008.
}

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