From a3309c2fa1b2e8fd95762f7915eda0f792406f5f Mon Sep 17 00:00:00 2001
From: Daniel Wehner <daniel@tag1consulting.com>
Date: Sun, 14 Feb 2016 20:28:51 +0100
Subject: [PATCH] fix tests

---
 src/Controller/RevisionControllerTrait.php | 4 ++--
 tests/src/Kernel/RevisionBasicUITest.php   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Controller/RevisionControllerTrait.php b/src/Controller/RevisionControllerTrait.php
index e623847..5c3319c 100644
--- a/src/Controller/RevisionControllerTrait.php
+++ b/src/Controller/RevisionControllerTrait.php
@@ -100,8 +100,8 @@ trait RevisionControllerTrait {
    * @return mixed[]
    */
   protected function revisionIds(ContentEntityInterface $entity) {
-    $entity_type = $entity->getEntityTypeId();
-    $result = $this->entityTypeManager()->getStorage($entity_type)->getQuery()
+    $entity_type = $entity->getEntityType();
+    $result = $this->entityTypeManager()->getStorage($entity_type->id())->getQuery()
       ->allRevisions()
       ->condition($entity_type->getKey('id'), $entity->id())
       ->sort($entity_type->getKey('revision'), 'DESC')
diff --git a/tests/src/Kernel/RevisionBasicUITest.php b/tests/src/Kernel/RevisionBasicUITest.php
index fc5dab0..5cb7649 100644
--- a/tests/src/Kernel/RevisionBasicUITest.php
+++ b/tests/src/Kernel/RevisionBasicUITest.php
@@ -49,6 +49,7 @@ class RevisionBasicUITest extends KernelTestBase {
   public function testRevisionHistory() {
     $entity = EnhancedEntity::create([
       'name' => 'rev 1',
+      'type' => 'default',
     ]);
     $entity->save();
 
-- 
GitLab