function ModeratedContentViewLatestRevisionUpdateTest::testUpdateModeratedContentView

Tests updating the moderated content view.

File

core/modules/content_moderation/tests/src/Functional/Update/ModeratedContentViewLatestRevisionUpdateTest.php, line 32

Class

ModeratedContentViewLatestRevisionUpdateTest
Tests the upgrade path for updating the moderated content view.

Namespace

Drupal\Tests\content_moderation\Functional\Update

Code

public function testUpdateModeratedContentView() {
    $display = View::load('moderated_content')->getDisplay('default');
    $this->assertArrayHasKey('latest_revision', $display['display_options']['filters']);
    $this->assertArrayNotHasKey('latest_translation_affected_revision', $display['display_options']['filters']);
    $this->runUpdates();
    $display = View::load('moderated_content')->getDisplay('default');
    $this->assertArrayNotHasKey('latest_revision', $display['display_options']['filters']);
    $this->assertArrayHasKey('latest_translation_affected_revision', $display['display_options']['filters']);
}

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