diff --git a/core/modules/comment/src/Tests/CommentTypeTest.php b/core/modules/comment/src/Tests/CommentTypeTest.php index 4feaf04..c8d1058 100644 --- a/core/modules/comment/src/Tests/CommentTypeTest.php +++ b/core/modules/comment/src/Tests/CommentTypeTest.php @@ -199,9 +199,6 @@ public function testCommentEntityIdEntityReferenceProperties() { $node_comment_type = $this->createCommentType('node_comment_type'); $this->drupalCreateContentType(array('type' => 'page')); $this->addDefaultCommentField('node', 'page', 'node_comment', CommentItemInterface::OPEN, 'node_comment_type'); - $field_storage = FieldStorageConfig::loadByName('node', 'node_comment'); - - $this->assertEqual($field_storage->getSetting('target_type') , $node_comment_type->getTargetEntityTypeId()); $this->drupalLogin($this->adminUser); @@ -220,6 +217,7 @@ public function testCommentEntityIdEntityReferenceProperties() { 'entity_id' => $node->id(), )); $comment->save(); + $this->assertEqual($comment->entity_id->getSetting('target_type'), $node->getEntityTypeId()); $this->assertEqual($comment->entity_id->target_id, $node->id()); $this->assertTrue($comment->entity_id->entity instanceof NodeInterface); $this->assertEqual($comment->entity_id->entity->id(), $node->id()); @@ -234,8 +232,6 @@ public function testCommentEntityIdEntityReferenceProperties() { )); $user_comment_type->save(); $this->addDefaultCommentField('user', 'user', 'user_comment', CommentItemInterface::OPEN, 'user_comment_type'); - $field_storage = FieldStorageConfig::loadByName('user', 'user_comment'); - $this->assertEqual($field_storage->getSetting('target_type') , $user_comment_type->getTargetEntityTypeId()); $this->drupalLogin($this->adminUser); @@ -247,6 +243,7 @@ public function testCommentEntityIdEntityReferenceProperties() { 'entity_id' => $this->adminUser->id(), )); $comment->save(); + $this->assertEqual($comment->entity_id->getSetting('target_type'), $this->adminUser->getEntityTypeId()); $this->assertEqual($comment->entity_id->target_id, $this->adminUser->id()); $this->assertTrue($comment->entity_id->entity instanceof UserInterface); $this->assertEqual($comment->entity_id->entity->id(), $this->adminUser->id());