diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index fa03124..0a9936d 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -17,7 +17,7 @@ use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Language\LanguageInterface; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\field\Entity\FieldConfig; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -955,9 +955,9 @@ protected function doLoadFieldItems($entities, $age) { // Collect impacted fields. $fields = array(); foreach ($bundles as $bundle => $v) { - foreach ($this->entityManager->getFieldDefinitions($this->entityTypeId, $bundle) as $field_name => $instance) { - if ($this->usesDedicatedTable($instance)) { - $fields[$field_name] = $instance; + foreach ($this->entityManager->getFieldDefinitions($this->entityTypeId, $bundle) as $field_name => $field_definition) { + if ($this->usesDedicatedTable($field_definition)) { + $fields[$field_name] = $field_definition; } } } @@ -1022,12 +1022,12 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { $vid = $id; } - foreach ($this->entityManager->getFieldDefinitions($entity_type, $bundle) as $field_name => $instance) { - if (!$this->usesDedicatedTable($instance)) { + foreach ($this->entityManager->getFieldDefinitions($entity_type, $bundle) as $field_name => $field_definition) { + if (!$this->usesDedicatedTable($field_definition)) { continue; } - $table_name = static::_fieldTableName($instance); - $revision_name = static::_fieldRevisionTableName($instance); + $table_name = static::_fieldTableName($field_definition); + $revision_name = static::_fieldRevisionTableName($field_definition); // Delete and insert, rather than update, in case a value was added. if ($update) { @@ -1047,13 +1047,13 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { // Prepare the multi-insert query. $do_insert = FALSE; $columns = array('entity_id', 'revision_id', 'bundle', 'delta', 'langcode'); - foreach ($instance->getColumns() as $column => $attributes) { - $columns[] = static::_fieldColumnName($instance, $column); + foreach ($field_definition->getColumns() as $column => $attributes) { + $columns[] = static::_fieldColumnName($field_definition, $column); } $query = $this->database->insert($table_name)->fields($columns); $revision_query = $this->database->insert($revision_name)->fields($columns); - $langcodes = $instance->isTranslatable() ? $translation_langcodes : array($default_langcode); + $langcodes = $field_definition->isTranslatable() ? $translation_langcodes : array($default_langcode); foreach ($langcodes as $langcode) { $delta_count = 0; $items = $entity->getTranslation($langcode)->get($field_name); @@ -1068,15 +1068,15 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { 'delta' => $delta, 'langcode' => $langcode, ); - foreach ($instance->getColumns() as $column => $attributes) { - $column_name = static::_fieldColumnName($instance, $column); + foreach ($field_definition->getColumns() as $column => $attributes) { + $column_name = static::_fieldColumnName($field_definition, $column); // Serialize the value if specified in the column schema. $record[$column_name] = !empty($attributes['serialize']) ? serialize($item->$column) : $item->$column; } $query->values($record); $revision_query->values($record); - if ($instance->getCardinality() != FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED && ++$delta_count == $instance->getCardinality()) { + if ($field_definition->getCardinality() != FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED && ++$delta_count == $field_definition->getCardinality()) { break; } } @@ -1098,12 +1098,12 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { * {@inheritdoc} */ protected function doDeleteFieldItems(EntityInterface $entity) { - foreach ($this->entityManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $instance) { - if (!$this->usesDedicatedTable($instance)) { + foreach ($this->entityManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $field_definition) { + if (!$this->usesDedicatedTable($field_definition)) { continue; } - $table_name = static::_fieldTableName($instance); - $revision_name = static::_fieldRevisionTableName($instance); + $table_name = static::_fieldTableName($field_definition); + $revision_name = static::_fieldRevisionTableName($field_definition); $this->database->delete($table_name) ->condition('entity_id', $entity->id()) ->execute(); @@ -1119,11 +1119,11 @@ protected function doDeleteFieldItems(EntityInterface $entity) { protected function doDeleteFieldItemsRevision(EntityInterface $entity) { $vid = $entity->getRevisionId(); if (isset($vid)) { - foreach ($this->entityManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $instance) { - if (!$this->usesDedicatedTable($instance)) { + foreach ($this->entityManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $field_definition) { + if (!$this->usesDedicatedTable($field_definition)) { continue; } - $revision_name = static::_fieldRevisionTableName($instance); + $revision_name = static::_fieldRevisionTableName($field_definition); $this->database->delete($revision_name) ->condition('entity_id', $entity->id()) ->condition('revision_id', $vid) @@ -1198,7 +1198,7 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $ } else { if ($storage_definition->getColumns() != $original->getColumns()) { - throw new StorageDefinitionUpdateForbiddenException("The SQL storage cannot change the schema for an existing field with data."); + throw new FieldStorageDefinitionUpdateForbiddenException("The SQL storage cannot change the schema for an existing field with data."); } // There is data, so there are no column changes. Drop all the prior // indexes and create all the new ones, except for all the priors that @@ -1310,12 +1310,12 @@ protected function readFieldItemsToPurge(FieldDefinitionInterface $field_definit $table_name = static::_fieldTableName($field_definition, $is_deleted); // Get the entities which we want to purge first. - $query = $this->database->select($table_name, 't', array('fetch' => \PDO::FETCH_ASSOC)); - $or = $query->orConditionGroup(); + $entity_query = $this->database->select($table_name, 't', array('fetch' => \PDO::FETCH_ASSOC)); + $or = $entity_query->orConditionGroup(); foreach ($field_definition->getColumns() as $column_name => $data) { $or->isNotNull(static::_fieldColumnName($field_definition, $column_name)); } - $query + $entity_query ->distinct(TRUE) ->fields('t', array('entity_id')) ->condition('bundle', $field_definition->getBundle()) @@ -1329,13 +1329,13 @@ protected function readFieldItemsToPurge(FieldDefinitionInterface $field_definit $entities = array(); $items_by_entity = array(); - foreach ($query->execute() as $row) { - $query = $this->database->select($table_name, 't', array('fetch' => \PDO::FETCH_ASSOC)) + foreach ($entity_query->execute() as $row) { + $item_query = $this->database->select($table_name, 't', array('fetch' => \PDO::FETCH_ASSOC)) ->fields('t') ->condition('entity_id', $row['entity_id']) ->orderBy('delta'); - foreach ($query->execute() as $item_row) { + foreach ($item_query->execute() as $item_row) { if (!isset($entities[$item_row['revision_id']])) { // Create entity with the right revision id and entity id combination. $item_row['entity_type'] = $this->entityTypeId; diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 0f0edab..867654e 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -394,7 +394,8 @@ protected function buildBaseFieldDefinitions($entity_type_id) { } } - // Automatically set the field name for non-configurable fields. + // Automatically set the field name, target entity type and bundle + // for non-configurable fields. foreach ($base_field_definitions as $field_name => $base_field_definition) { if ($base_field_definition instanceof FieldDefinition) { $base_field_definition->setName($field_name); @@ -492,7 +493,8 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $ } } - // Automatically set the field name for non-configurable fields. + // Automatically set the field name, target entity type and bundle + // for non-configurable fields. foreach ($bundle_field_definitions as $field_name => $field_definition) { if ($field_definition instanceof FieldDefinition) { $field_definition->setName($field_name); diff --git a/core/lib/Drupal/Core/Entity/Exception/StorageDefinitionUpdateForbiddenException.php b/core/lib/Drupal/Core/Entity/Exception/FieldStorageDefinitionUpdateForbiddenException.php similarity index 74% rename from core/lib/Drupal/Core/Entity/Exception/StorageDefinitionUpdateForbiddenException.php rename to core/lib/Drupal/Core/Entity/Exception/FieldStorageDefinitionUpdateForbiddenException.php index 073bee6..54e2bff 100644 --- a/core/lib/Drupal/Core/Entity/Exception/StorageDefinitionUpdateForbiddenException.php +++ b/core/lib/Drupal/Core/Entity/Exception/FieldStorageDefinitionUpdateForbiddenException.php @@ -10,4 +10,4 @@ /** * Exception thrown when a storage definition update is forbidden. */ -class StorageDefinitionUpdateForbiddenException extends \Exception { } +class FieldStorageDefinitionUpdateForbiddenException extends \Exception { } diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php b/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php index abef6d3..2d695c3 100644 --- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php @@ -13,7 +13,7 @@ interface FieldableEntityStorageInterface extends EntityStorageInterface { /** - * Reacts to the creation of field storage definition. + * Reacts to the creation of a field storage definition. * * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition * The definition being created. @@ -28,7 +28,7 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $ * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $original * The original storage definition; i.e., the definition before the update. * - * @throws \Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException + * @throws \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException * Thrown when the update to the field is forbidden. */ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original); diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php index 0d407de..0d60c24 100644 --- a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php @@ -58,7 +58,7 @@ * Gets the bundle the field is defined for. * * @return string|null - * The bundle the field is defined for, or NULL if it is base field; i.e., + * The bundle the field is defined for, or NULL if it is a base field; i.e., * it is not bundle-specific. */ public function getBundle(); diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php index 915b96b..b5eed52 100644 --- a/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -253,7 +253,7 @@ function hook_field_config_update_forbid(\Drupal\field\FieldConfigInterface $fie ->range(0, 1) ->execute(); if ($found) { - throw new \Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException("Cannot update a list field not to include keys with existing data"); + throw new \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException("Cannot update a list field not to include keys with existing data"); } } } diff --git a/core/modules/field/field.module b/core/modules/field/field.module index dbd4924..cb1cf36 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -211,7 +211,21 @@ function field_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) { $instance->set('id', $id_new); $instance->bundle = $bundle_new; $instance->allowBundleRename(); - $instance->save(); + if (!$instance->isDeleted()) { + // Save non-deleted fields. + $instance->save(); + } + else { + // Update deleted field manually. + $state = \Drupal::state(); + + // Keep the instance definitions in the state storage so we can use them + // later during field_purge_batch(). + $deleted_instances = $state->get('field.instance.deleted') ?: array(); + $config = $instance->toArray(); + $deleted_instances[$instance->uuid] = $config; + $state->set('field.instance.deleted', $deleted_instances); + } } } diff --git a/core/modules/field/src/Entity/FieldInstanceConfig.php b/core/modules/field/src/Entity/FieldInstanceConfig.php index 3e13733..60ad467 100644 --- a/core/modules/field/src/Entity/FieldInstanceConfig.php +++ b/core/modules/field/src/Entity/FieldInstanceConfig.php @@ -828,7 +828,7 @@ public static function loadByName($entity_type_id, $bundle, $field_name) { * {@inheritdoc} */ public function getUniqueStorageIdentifier() { - return $this->field->uuid(); + return $this->getField()->getUniqueStorageIdentifier(); } } diff --git a/core/modules/field/src/Tests/CrudTest.php b/core/modules/field/src/Tests/CrudTest.php index 20c9d85..6a16101 100644 --- a/core/modules/field/src/Tests/CrudTest.php +++ b/core/modules/field/src/Tests/CrudTest.php @@ -8,7 +8,7 @@ namespace Drupal\field\Tests; use Drupal\Core\Entity\EntityStorageException; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\field\Entity\FieldConfig; use Drupal\field\FieldException; @@ -441,7 +441,7 @@ function testUpdateFieldForbid() { $field->save(); $this->pass(t("A changeable setting can be updated.")); } - catch (StorageDefinitionUpdateForbiddenException $e) { + catch (FieldStorageDefinitionUpdateForbiddenException $e) { $this->fail(t("An unchangeable setting cannot be updated.")); } $field->settings['unchangeable']++; @@ -449,7 +449,7 @@ function testUpdateFieldForbid() { $field->save(); $this->fail(t("An unchangeable setting can be updated.")); } - catch (StorageDefinitionUpdateForbiddenException $e) { + catch (FieldStorageDefinitionUpdateForbiddenException $e) { $this->pass(t("An unchangeable setting cannot be updated.")); } } diff --git a/core/modules/field/tests/modules/field_test/field_test.field.inc b/core/modules/field/tests/modules/field_test/field_test.field.inc index 53ad04e..93e090b 100644 --- a/core/modules/field/tests/modules/field_test/field_test.field.inc +++ b/core/modules/field/tests/modules/field_test/field_test.field.inc @@ -10,7 +10,7 @@ use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Session\AccountInterface; use Drupal\field\FieldConfigInterface; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; /** * Implements hook_field_widget_info_alter(). @@ -24,7 +24,7 @@ function field_test_field_widget_info_alter(&$info) { */ function field_test_field_config_update_forbid(FieldConfigInterface $field, FieldConfigInterface $prior_field) { if ($field->getType() == 'test_field' && $field->getSetting('unchangeable') != $prior_field->getSetting('unchangeable')) { - throw new StorageDefinitionUpdateForbiddenException("field_test 'unchangeable' setting cannot be changed'"); + throw new FieldStorageDefinitionUpdateForbiddenException("field_test 'unchangeable' setting cannot be changed'"); } } diff --git a/core/modules/options/options.module b/core/modules/options/options.module index e51720d..16c3498 100644 --- a/core/modules/options/options.module +++ b/core/modules/options/options.module @@ -8,7 +8,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\field\FieldConfigInterface; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Symfony\Component\HttpFoundation\Request; /** @@ -100,7 +100,7 @@ function options_field_config_update_forbid(FieldConfigInterface $field, FieldCo $prior_allowed_values = $prior_field->getSetting('allowed_values'); $lost_keys = array_diff(array_keys($prior_allowed_values), array_keys($allowed_values)); if (_options_values_in_use($field->entity_type, $field->getName(), $lost_keys)) { - throw new StorageDefinitionUpdateForbiddenException(t('A list field (@field_name) with existing data cannot have its keys changed.', array('@field_name' => $field->getName()))); + throw new FieldStorageDefinitionUpdateForbiddenException(t('A list field (@field_name) with existing data cannot have its keys changed.', array('@field_name' => $field->getName()))); } } } diff --git a/core/modules/options/src/Tests/OptionsFieldTest.php b/core/modules/options/src/Tests/OptionsFieldTest.php index 044922a..ed775b4 100644 --- a/core/modules/options/src/Tests/OptionsFieldTest.php +++ b/core/modules/options/src/Tests/OptionsFieldTest.php @@ -7,7 +7,7 @@ namespace Drupal\options\Tests; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; /** * Tests for the 'Options' field types. @@ -50,7 +50,7 @@ function testUpdateAllowedValues() { $this->field->save(); $this->fail(t('Cannot update a list field to not include keys with existing data.')); } - catch (StorageDefinitionUpdateForbiddenException $e) { + catch (FieldStorageDefinitionUpdateForbiddenException $e) { $this->pass(t('Cannot update a list field to not include keys with existing data.')); } // Empty the value, so that we can actually remove the option. diff --git a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php index 16521c0..f1048eb 100644 --- a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php +++ b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php @@ -56,9 +56,9 @@ public function testCustomBundleFieldCreateDelete() { $this->moduleHandler->install(array('entity_bundle_field_test'), FALSE); $definition = $this->entityManager->getFieldDefinitions('entity_test', 'custom')['custom_field']; $this->assertNotNull($definition, 'Field definition found.'); + // Make sure the table has been created. $table = $this->entityManager->getStorage('entity_test')->_fieldTableName($definition); - $this->assertTrue($this->database->schema()->tableExists($table), 'Table created'); $this->moduleHandler->uninstall(array('entity_bundle_field_test'), FALSE); $this->assertFalse($this->database->schema()->tableExists($table), 'Table dropped'); @@ -68,12 +68,17 @@ public function testCustomBundleFieldCreateDelete() { * Tests making use of a custom bundle field. */ public function testCustomBundleFieldUsage() { + // Check that an entity with bundle entity_test does not have the custom + // field. $this->moduleHandler->install(array('entity_bundle_field_test'), FALSE); $storage = $this->entityManager->getStorage('entity_test'); $entity = $storage->create([ 'type' => 'entity_test', ]); $this->assertFalse($entity->hasField('custom_field')); + + // Check that the custom bundle has the defined custom field and check + // saving and deleting of custom field data. $entity = $storage->create([ 'type' => 'custom', ]); @@ -82,21 +87,25 @@ public function testCustomBundleFieldUsage() { $entity->save(); $storage->resetCache(); $entity = $storage->load($entity->id()); - $this->assertEqual($entity->custom_field->value, 'swanky'); + $this->assertEqual($entity->custom_field->value, 'swanky', 'Entity was saved correct.y'); $entity->custom_field->value = 'cozy'; $entity->save(); $storage->resetCache(); $entity = $storage->load($entity->id()); - $this->assertEqual($entity->custom_field->value, 'cozy'); + $this->assertEqual($entity->custom_field->value, 'cozy', 'Entity was updated correctly.'); + $entity->delete(); - $table = $storage->_fieldTableName($entity->getFieldDefinition('custom_field')); $result = $this->database->select($table, 'f') ->fields('f') ->condition('entity_id', $entity->id()) ->execute(); $this->assertFalse($result->fetchAssoc(), 'Field data has been deleted'); + + // Delete the bundle. + entity_test_delete_bundle('custom'); + $this->assertFalse($this->database->schema()->tableExists($table), 'Custom field table was deleted'); } } diff --git a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php index f88e9f0..fcec7ca 100644 --- a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php +++ b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php @@ -9,7 +9,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\Entity\ContentEntityDatabaseStorage; -use Drupal\Core\Entity\Exception\StorageDefinitionUpdateForbiddenException; +use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\field\Entity\FieldConfig; /** @@ -321,7 +321,7 @@ function testUpdateFieldSchemaWithData() { $field->save(); $this->fail(t('Cannot update field schema with data.')); } - catch (StorageDefinitionUpdateForbiddenException $e) { + catch (FieldStorageDefinitionUpdateForbiddenException $e) { $this->pass(t('Cannot update field schema with data.')); } } diff --git a/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.info.yml b/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.info.yml index eca979e..6732090 100644 --- a/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.info.yml +++ b/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.info.yml @@ -5,4 +5,4 @@ package: Testing version: VERSION core: 8.x dependencies: - - entity_test \ No newline at end of file + - entity_test diff --git a/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.module b/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.module index 81e9df4..55f5bff 100644 --- a/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.module +++ b/core/modules/system/tests/modules/entity_bundle_field_test/entity_bundle_field_test.module @@ -55,12 +55,15 @@ function entity_bundle_field_test_entity_bundle_field_info(\Drupal\Core\Entity\E /** * Implements hook_entity_bundle_delete(). */ -function entity_bundle_field_test_entity_bundle_delete($entity_type, $bundle) { - if ($entity_type->id() == 'entity_test' && $bundle == 'custom') { +function entity_bundle_field_test_entity_bundle_delete($entity_type_id, $bundle) { + if ($entity_type_id == 'entity_test' && $bundle == 'custom') { // Notify the entity storage that our field is gone. + $field_definition = FieldDefinition::create('string') + ->setTargetEntityTypeId($entity_type_id) + ->setBundle($bundle) + ->setName('custom_field') + ->setLabel(t('A custom field')); \Drupal::entityManager()->getStorage('entity_test') - >onFieldDefinitionDelete(FieldDefinition::create('string') - ->setName('custom_field') - ->setLabel(t('A custom field'))); + ->onFieldDefinitionDelete($field_definition); } } diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php index 1345298..a4250b7 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php @@ -956,7 +956,7 @@ public function testFieldSqlSchemaForEntityWithStringIdentifier() { ->method('getBaseFieldDefinitions') ->will($this->returnValue($this->fieldDefinitions)); - // Define a field definition for a test_field fuuidield. + // Define a field definition for a test_field field. $field = $this->getMock('\Drupal\Core\Field\FieldStorageDefinitionInterface'); $field->deleted = FALSE;