public function test_ajax_entity_search()
{
- $page = Page::all()->last();
+ $page = $this->newPage(['name' => 'my ajax search test', 'html' => 'ajax test']);
$notVisitedPage = Page::first();
// Visit the page to make popular
use BookStack\Bookshelf;
use BookStack\Chapter;
use BookStack\Entity;
+use BookStack\Page;
use BookStack\Repos\EntityRepo;
use BookStack\Repos\PermissionsRepo;
use BookStack\Role;
/**
* Create and return a new test page
* @param array $input
- * @return Chapter
+ * @return Page
*/
public function newPage($input = ['name' => 'test page', 'html' => 'My new test page']) {
$book = Book::first();