1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Migrated much test entity usage via find/replace

This commit is contained in:
Dan Brown
2022-09-29 17:31:38 +01:00
parent 068a8a068c
commit b56f7355aa
45 changed files with 264 additions and 384 deletions

View File

@ -23,8 +23,7 @@ class EntitySearchTest extends TestCase
public function test_bookshelf_search()
{
/** @var Bookshelf $shelf */
$shelf = Bookshelf::query()->first();
$shelf = $this->entities->shelf();
$search = $this->asEditor()->get('/search?term=' . urlencode($shelf->name) . ' {type:bookshelf}');
$search->assertSee('Search Results');
@ -232,7 +231,7 @@ class EntitySearchTest extends TestCase
public function test_ajax_entity_search_reflects_items_without_permission()
{
$page = Page::query()->first();
$page = $this->entities->page();
$baseSelector = 'a[data-entity-type="page"][data-entity-id="' . $page->id . '"]';
$searchUrl = '/ajax/search/entities?permission=update&term=' . urlencode($page->name);
@ -318,7 +317,7 @@ class EntitySearchTest extends TestCase
public function test_search_works_on_updated_page_content()
{
$page = Page::query()->first();
$page = $this->entities->page();
$this->asEditor();
$update = $this->put($page->getUrl(), [