diff --git a/core/modules/block_content/src/Tests/Update/BlockContentUpdateTest.php b/core/modules/block_content/src/Tests/Update/BlockContentUpdateTest.php index e69de29..5557b77 100644 --- a/core/modules/block_content/src/Tests/Update/BlockContentUpdateTest.php +++ b/core/modules/block_content/src/Tests/Update/BlockContentUpdateTest.php @@ -0,0 +1,41 @@ +databaseDumpFiles = [ + __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8-rc1.bare.standard.php.gz', + ]; + } + + /** + * Tests adding a status field to the block content entuty type. + * + * @see block_content_update_8004() + */ + public function testStatusField() { + // Check that the 'status' field does not exist prior to the update. + $field = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('status', 'block_content'); + $this->assertIdentical(NULL, $field); + + // Run updates. + $this->runUpdates(); + + // Check that the field exists and has the correct label. + $updated_field = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('status', 'block_content'); + $this->assertEqual('Publishing status', $updated_field->getLabel()); + } + +}