protected $admin;
protected $editor;
+ /**
+ * The base URL to use while testing the application.
+ * @var string
+ */
+ protected $baseUrl = 'http://localhost';
+
/**
* Set the current user context to be an admin.
* @return $this
return $this->editor;
}
+ /**
+ * Get an instance of a user with 'viewer' permissions
+ * @param $attributes
+ * @return mixed
+ */
+ protected function getViewer($attributes = [])
+ {
+ $user = \BookStack\Role::getRole('viewer')->users()->first();
+ if (!empty($attributes)) $user->forceFill($attributes)->save();
+ return $user;
+ }
+
/**
* Create and return a new book.
* @param array $input