]> BookStack Code Mirror - bookstack/blobdiff - tests/TestCase.php
Added translation string for tasklist WYSIWYG action
[bookstack] / tests / TestCase.php
index 080515173d67cdd6cdf3605dc9e66c7ad1de42a4..98e0dfbacf4c4cfb6321a55d9aa44fe9e491c6ef 100644 (file)
@@ -62,7 +62,7 @@ abstract class TestCase extends BaseTestCase
      * Assert that an activity entry exists of the given key.
      * Checks the activity belongs to the given entity if provided.
      */
-    protected function assertActivityExists(string $type, Entity $entity = null)
+    protected function assertActivityExists(string $type, ?Entity $entity = null, string $detail = '')
     {
         $detailsToCheck = ['type' => $type];
 
@@ -71,6 +71,10 @@ abstract class TestCase extends BaseTestCase
             $detailsToCheck['entity_id'] = $entity->id;
         }
 
+        if ($detail) {
+            $detailsToCheck['detail'] = $detail;
+        }
+
         $this->assertDatabaseHas('activities', $detailsToCheck);
     }
 }