function RemoveRevisionMetadataBcLayerUpdateTest::testRevisionMetadataBcLayerRemoval

See also

system_post_update_entity_revision_metadata_bc_cleanup()

File

core/modules/system/tests/src/Functional/Update/RemoveRevisionMetadataBcLayerUpdateTest.php, line 28

Class

RemoveRevisionMetadataBcLayerUpdateTest
Tests the upgrade path for removing the revision metadata BC layer.

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testRevisionMetadataBcLayerRemoval() {
    $entity_type = \Drupal::service('entity.last_installed_schema.repository')->getLastInstalledDefinition('node');
    $this->assertArrayHasKey("\x00*\x00requiredRevisionMetadataKeys", (array) $entity_type);
    $this->runUpdates();
    $entity_type = \Drupal::service('entity.last_installed_schema.repository')->getLastInstalledDefinition('node');
    $this->assertArrayNotHasKey("\x00*\x00requiredRevisionMetadataKeys", (array) $entity_type);
}

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