diff --git a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
index d8b63ce418..1bd3970536 100644
--- a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
+++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php
@@ -93,8 +93,10 @@ protected function setUp() {
 
     $typed_data_manager->expects($this->any())
       ->method('getDefinition')
-      ->with($this->equalTo('field_item:string_long'))
-      ->willReturn(['class' => '\Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem']);
+      ->will($this->returnValueMap([
+        'entity:user' => ['class' => '\Drupal\Core\TypedData\DataDefinitionInterface'],
+        'field_item:string_long' => ['class' => '\Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem'],
+      ]));
 
     $this->baseEntityType = new TestEntityType([
       'base_table' => 'entity_test',
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
index 5e755d9584..6788209705 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
@@ -11,6 +11,7 @@
 use Drupal\Core\TypedData\DataReferenceDefinitionInterface;
 use Drupal\Core\TypedData\ListDataDefinitionInterface;
 use Drupal\KernelTests\KernelTestBase;
+use Drupal\node\Entity\NodeType;
 
 /**
  * Tests deriving metadata of entity and field data types.
@@ -31,10 +32,16 @@ class EntityTypedDataDefinitionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'text', 'node', 'user'];
+  public static $modules = ['system', 'filter', 'text', 'node', 'user'];
 
   protected function setUp() {
     parent::setup();
+
+    NodeType::create([
+      'type' => 'article',
+      'name' => 'Article',
+    ])->save();
+
     $this->typedDataManager = $this->container->get('typed_data_manager');
   }
 
@@ -82,10 +89,15 @@ public function testFields() {
    */
   public function testEntities() {
     $entity_definition = EntityDataDefinition::create('node');
+    $bundle_definition = EntityDataDefinition::create('node', 'article');
     // Entities are complex data.
     $this->assertFalse($entity_definition instanceof ListDataDefinitionInterface);
     $this->assertTrue($entity_definition instanceof ComplexDataDefinitionInterface);
 
+    // Entity definitions should inherit their labels from the entity type.
+    $this->assertEquals('Content', $entity_definition->getLabel());
+    $this->assertEquals('Article', $bundle_definition->getLabel());
+
     $field_definitions = $entity_definition->getPropertyDefinitions();
     // Comparison should ignore the internal static cache, so compare the
     // serialized objects instead.
