Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / Entity / EntityTest.php
index 9f8c5b052167c7d36c77d3219b254471987db833..771d81a9adcc487018e7c06934b908af6be9306c 100644 (file)
@@ -109,7 +109,7 @@ class EntityTest extends ContentEntityBase implements EntityOwnerInterface {
         ],
       ]);
 
-    return $fields;
+    return $fields + \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
   }
 
   /**
@@ -164,4 +164,15 @@ class EntityTest extends ContentEntityBase implements EntityOwnerInterface {
     return $this->get('name')->value;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getEntityKey($key) {
+    // Typically this protected method is used internally by entity classes and
+    // exposed publicly through more specific getter methods. So that test cases
+    // are able to set and access entity keys dynamically, update the visibility
+    // of this method to public.
+    return parent::getEntityKey($key);
+  }
+
 }