diff -u b/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php --- b/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -503,8 +503,8 @@ } // Populate $this->fields to speed-up further look-ups and to keep track of // fields objects, possibly holding changes to field values. - // Computed fields are always computed as their value might be subject to changes - // in the entities' lifecycle. + // Computed fields are always computed as their value might be subject to + // changes in the entities' lifecycle. if (!isset($this->fields[$name][$langcode]) || $this->fields[$name][$langcode]->isComputed()) { $definition = $this->getFieldDefinition($name); if (!$definition) { only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php @@ -472,9 +472,12 @@ public function testLabel() { * - Fields array for $fields. */ public function providerGet() { + $items = $this->getMockBuilder('Drupal\Core\Field\FieldItemList') + ->disableOriginalConstructor() + ->getMock(); return [ // Populated fields array. - ['result', 'field_name', 'langcode', ['field_name' => ['langcode' => 'result']]], + [$items, 'field_name', 'langcode', ['field_name' => ['langcode' => $items]]], // Incomplete fields array. ['getTranslatedField_result', 'field_name', 'langcode', ['field_name' => 'no_langcode']], // Empty fields array.