Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Entity / EntityTypedDataDefinitionTest.php
index ece711b1b03d42bb0bcc70d640361819748f2706..d0c01bccb5d8727121da0d42885539df5c443a3d 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace Drupal\KernelTests\Core\Entity;
 
+use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\TypedData\EntityDataDefinition;
@@ -39,11 +40,6 @@ class EntityTypedDataDefinitionTest extends KernelTestBase {
   protected function setUp() {
     parent::setup();
 
-    NodeType::create([
-      'type' => 'article',
-      'name' => 'Article',
-    ])->save();
-
     $this->typedDataManager = $this->container->get('typed_data_manager');
   }
 
@@ -90,6 +86,11 @@ class EntityTypedDataDefinitionTest extends KernelTestBase {
    * Tests deriving metadata about entities.
    */
   public function testEntities() {
+    NodeType::create([
+      'type' => 'article',
+      'name' => 'Article',
+    ])->save();
+
     $entity_definition = EntityDataDefinition::create('node');
     $bundle_definition = EntityDataDefinition::create('node', 'article');
     // Entities are complex data.
@@ -149,6 +150,7 @@ class EntityTypedDataDefinitionTest extends KernelTestBase {
     $entity_type_id = $this->randomMachineName();
 
     $entity_type = $this->prophesize(EntityTypeInterface::class);
+    $entity_type->entityClassImplements(ConfigEntityInterface::class)->willReturn(FALSE);
     $entity_type->getLabel()->willReturn($this->randomString());
     $entity_type->getConstraints()->willReturn([]);
     $entity_type->isInternal()->willReturn($internal);