Re-structured the app code to be feature based rather than code type based

This commit is contained in:
Dan Brown
2018-09-25 12:30:50 +01:00
parent 19751ed1cb
commit 919660678b
109 changed files with 684 additions and 531 deletions

View File

@ -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'
])