mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-30 07:32:39 +01:00
Made search test a little more consistent
This commit is contained in:
parent
93f820d9da
commit
9243c635f2
@ -172,7 +172,7 @@ class EntitySearchTest extends TestCase
|
|||||||
|
|
||||||
public function test_ajax_entity_search()
|
public function test_ajax_entity_search()
|
||||||
{
|
{
|
||||||
$page = Page::all()->last();
|
$page = $this->newPage(['name' => 'my ajax search test', 'html' => 'ajax test']);
|
||||||
$notVisitedPage = Page::first();
|
$notVisitedPage = Page::first();
|
||||||
|
|
||||||
// Visit the page to make popular
|
// Visit the page to make popular
|
||||||
|
@ -4,6 +4,7 @@ use BookStack\Book;
|
|||||||
use BookStack\Bookshelf;
|
use BookStack\Bookshelf;
|
||||||
use BookStack\Chapter;
|
use BookStack\Chapter;
|
||||||
use BookStack\Entity;
|
use BookStack\Entity;
|
||||||
|
use BookStack\Page;
|
||||||
use BookStack\Repos\EntityRepo;
|
use BookStack\Repos\EntityRepo;
|
||||||
use BookStack\Repos\PermissionsRepo;
|
use BookStack\Repos\PermissionsRepo;
|
||||||
use BookStack\Role;
|
use BookStack\Role;
|
||||||
@ -112,7 +113,7 @@ trait SharedTestHelpers
|
|||||||
/**
|
/**
|
||||||
* Create and return a new test page
|
* Create and return a new test page
|
||||||
* @param array $input
|
* @param array $input
|
||||||
* @return Chapter
|
* @return Page
|
||||||
*/
|
*/
|
||||||
public function newPage($input = ['name' => 'test page', 'html' => 'My new test page']) {
|
public function newPage($input = ['name' => 'test page', 'html' => 'My new test page']) {
|
||||||
$book = Book::first();
|
$book = Book::first();
|
||||||
|
Loading…
Reference in New Issue
Block a user