X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FEntity%2FEntityTypedDataDefinitionTest.php;h=d0c01bccb5d8727121da0d42885539df5c443a3d;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=ece711b1b03d42bb0bcc70d640361819748f2706;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php index ece711b1b..d0c01bccb 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php @@ -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);