You are here

public function ViewsConfigUpdaterTest::testUpdateAll in Drupal 9

Same name and namespace in other branches
  1. 8 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 125

Class

ViewsConfigUpdaterTest
@coversDefaultClass \Drupal\views\ViewsConfigUpdater

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.
}