mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-29 03:22:00 +08:00
Re-structured the app code to be feature based rather than code type based
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
<?php namespace Tests;
|
||||
|
||||
|
||||
use BookStack\Bookshelf;
|
||||
use BookStack\Chapter;
|
||||
use BookStack\Page;
|
||||
use BookStack\Entities\Bookshelf;
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
|
||||
class EntitySearchTest extends TestCase
|
||||
{
|
||||
|
||||
public function test_page_search()
|
||||
{
|
||||
$book = \BookStack\Book::all()->first();
|
||||
$book = \BookStack\Entities\Book::all()->first();
|
||||
$page = $book->pages->first();
|
||||
|
||||
$search = $this->asEditor()->get('/search?term=' . urlencode($page->name));
|
||||
@ -54,7 +54,7 @@ class EntitySearchTest extends TestCase
|
||||
|
||||
public function test_book_search()
|
||||
{
|
||||
$book = \BookStack\Book::first();
|
||||
$book = \BookStack\Entities\Book::first();
|
||||
$page = $book->pages->last();
|
||||
$chapter = $book->chapters->last();
|
||||
|
||||
@ -67,7 +67,7 @@ class EntitySearchTest extends TestCase
|
||||
|
||||
public function test_chapter_search()
|
||||
{
|
||||
$chapter = \BookStack\Chapter::has('pages')->first();
|
||||
$chapter = \BookStack\Entities\Chapter::has('pages')->first();
|
||||
$page = $chapter->pages[0];
|
||||
|
||||
$pageTestResp = $this->asEditor()->get('/search/chapter/' . $chapter->id . '?term=' . urlencode($page->name));
|
||||
@ -77,11 +77,11 @@ class EntitySearchTest extends TestCase
|
||||
public function test_tag_search()
|
||||
{
|
||||
$newTags = [
|
||||
new \BookStack\Tag([
|
||||
new \BookStack\Actions\Tag([
|
||||
'name' => 'animal',
|
||||
'value' => 'cat'
|
||||
]),
|
||||
new \BookStack\Tag([
|
||||
new \BookStack\Actions\Tag([
|
||||
'name' => 'color',
|
||||
'value' => 'red'
|
||||
])
|
||||
|
Reference in New Issue
Block a user