+ protected $baseUrl = 'http://localhost';
+
+ /**
+ * Set the current user context to be an admin.
+ * @return $this
+ */
+ public function asAdmin()
+ {
+ return $this->actingAs($this->getAdmin());
+ }
+
+ /**
+ * Get the current admin user.
+ * @return mixed
+ */
+ public function getAdmin() {
+ if($this->admin === null) {
+ $adminRole = Role::getSystemRole('admin');
+ $this->admin = $adminRole->users->first();
+ }
+ return $this->admin;
+ }
+
+ /**
+ * Set the current user context to be an editor.
+ * @return $this
+ */
+ public function asEditor()
+ {
+ return $this->actingAs($this->getEditor());
+ }
+
+
+ /**
+ * Get a editor user.
+ * @return mixed
+ */
+ public function getEditor() {
+ if($this->editor === null) {
+ $editorRole = Role::getRole('editor');
+ $this->editor = $editorRole->users->first();
+ }
+ return $this->editor;
+ }