]> BookStack Code Mirror - bookstack/blobdiff - tests/BrowserKitTest.php
Added front-end toggle and testing of inline attachments
[bookstack] / tests / BrowserKitTest.php
index 6c332a98469c4f5141972ee0b7e562b2f74b4ab2..7917a0c409e881a7b8790c9a7c19584c5f1b0327 100644 (file)
@@ -4,7 +4,6 @@ use BookStack\Auth\User;
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Models\Chapter;
 use BookStack\Entities\Models\Entity;
-use BookStack\Auth\Role;
 use BookStack\Auth\Permissions\PermissionService;
 use BookStack\Entities\Models\Page;
 use BookStack\Settings\SettingService;
@@ -48,14 +47,6 @@ abstract class BrowserKitTest extends TestCase
     }
 
 
-    /**
-     * Get a user that's not a system user such as the guest user.
-     */
-    public function getNormalUser()
-    {
-        return User::where('system_name', '=', null)->get()->last();
-    }
-
     /**
      * Quickly sets an array of settings.
      * @param $settingsArray
@@ -120,7 +111,7 @@ abstract class BrowserKitTest extends TestCase
      */
     protected function seeInNthElement($element, $position, $text, $negate = false)
     {
-        $method = $negate ? 'assertNotRegExp' : 'assertRegExp';
+        $method = $negate ? 'assertDoesNotMatchRegularExpression' : 'assertMatchesRegularExpression';
 
         $rawPattern = preg_quote($text, '/');