X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/bc4978479715f11f8413103f870ee9745109c6be..refs/pull/205/head:/tests/Entity/EntitySearchTest.php diff --git a/tests/Entity/EntitySearchTest.php b/tests/Entity/EntitySearchTest.php index a9d9bc047..8adfd35a3 100644 --- a/tests/Entity/EntitySearchTest.php +++ b/tests/Entity/EntitySearchTest.php @@ -76,6 +76,14 @@ class EntitySearchTest extends TestCase ->see('Chapter Search Results')->seeInElement('.entity-list', $chapter->name); } + public function test_search_quote_term_preparation() + { + $termString = '"192" cat "dog hat"'; + $repo = $this->app[\BookStack\Repos\EntityRepo::class]; + $preparedTerms = $repo->prepareSearchTerms($termString); + $this->assertTrue($preparedTerms === ['"192"','"dog hat"', 'cat']); + } + public function test_books_search_listing() { $book = \BookStack\Book::all()->last();