Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / rest / tests / src / Functional / EntityResource / Item / ItemResourceTestBase.php
index f217b97fbac0f14da4509308895adf0ef2bff058..c7bd57a5c6186148c1670d18b5458290bb7b1417 100644 (file)
@@ -78,6 +78,20 @@ abstract class ItemResourceTestBase extends EntityResourceTestBase {
     return $item;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function createAnotherEntity() {
+    $entity = $this->entity->createDuplicate();
+    $entity->setLink('https://www.example.org/');
+    $label_key = $entity->getEntityType()->getKey('label');
+    if ($label_key) {
+      $entity->set($label_key, $entity->label() . '_dupe');
+    }
+    $entity->save();
+    return $entity;
+  }
+
   /**
    * {@inheritdoc}
    */