function ViewsAddMissingLabelsUpdateTest::testViewsPostUpdateFixRevisionId

Same name in other branches
  1. 11.x core/modules/views/tests/src/Functional/Update/ViewsAddMissingLabelsUpdateTest.php \Drupal\Tests\views\Functional\Update\ViewsAddMissingLabelsUpdateTest::testViewsPostUpdateFixRevisionId()

Tests the upgrade path for adding missing labels.

File

core/modules/views/tests/src/Functional/Update/ViewsAddMissingLabelsUpdateTest.php, line 47

Class

ViewsAddMissingLabelsUpdateTest
Tests the upgrade path for adding missing labels.

Namespace

Drupal\Tests\views\Functional\Update

Code

public function testViewsPostUpdateFixRevisionId() : void {
    $view = View::load('test_fix_revision_id_update');
    $data = $view->toArray();
    $this->assertEmpty($data['label']);
    $this->runUpdates();
    $view = View::load('test_fix_revision_id_update');
    $data = $view->toArray();
    $this->assertSame('test_fix_revision_id_update', $data['label']);
}

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