diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index dac6584..97f9dd2 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1403,7 +1403,7 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st $column_schema = $field_schema['columns'][$field_column_name]; $schema['fields'][$schema_field_name] = $column_schema; - $schema['fields'][$schema_field_name]['description'] = $field_description; + $schema['fields'][$schema_field_name]['description'] = (string) $field_description; // Only entity keys are required. $keys = $this->entityType->getKeys() + array('langcode' => 'langcode'); // The label is an entity key, but label fields are not necessarily diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php index fa3678c..a333030 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php @@ -791,11 +791,13 @@ public function testClearCachedBundles() { public function testGetBundleInfo($entity_type_id, $expected) { $apple = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $apple->expects($this->once()) - ->method('getLabel') + ->method('get') + ->with('label') ->will($this->returnValue('Apple')); $banana = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $banana->expects($this->once()) - ->method('getLabel') + ->method('get') + ->with('label') ->will($this->returnValue('Banana')); $this->setUpEntityManager(array( 'apple' => $apple, @@ -836,11 +838,13 @@ public function providerTestGetBundleInfo() { public function testGetAllBundleInfo() { $apple = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $apple->expects($this->once()) - ->method('getLabel') + ->method('get') + ->with('label') ->will($this->returnValue('Apple')); $banana = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $banana->expects($this->once()) - ->method('getLabel') + ->method('get') + ->with('label') ->will($this->returnValue('Banana')); $this->setUpEntityManager(array( 'apple' => $apple,