]> BookStack Code Mirror - bookstack/blobdiff - tests/TestCase.php
Updated page revisions link visibility
[bookstack] / tests / TestCase.php
index 3ca7638c8e92c8a4d6071e024fb282f1c4e0cfa9..f17d27a1aa320fe4ae4e0bc50ade126ae326302f 100644 (file)
@@ -89,6 +89,14 @@ abstract class TestCase extends BaseTestCase
         return $this->editor;
     }
 
+    /**
+     * Set the current user context to be a viewer.
+     */
+    public function asViewer()
+    {
+        return $this->actingAs($this->getViewer());
+    }
+
     /**
      * Get an instance of a user with 'viewer' permissions.
      */