From 7b30c154c0aea94e42519d3809451429e93f9dc1 Mon Sep 17 00:00:00 2001 From: Nathan Glasl Date: Mon, 26 Aug 2019 15:12:13 +1000 Subject: [PATCH] [FIX] Resolving a namespace issue. --- src/services/ExtensibleSearchService.php | 2 +- tests/UnitTests.php | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/services/ExtensibleSearchService.php b/src/services/ExtensibleSearchService.php index 577af5b..bc0c819 100644 --- a/src/services/ExtensibleSearchService.php +++ b/src/services/ExtensibleSearchService.php @@ -64,7 +64,7 @@ public function logSuggestion($term, $pageID) { // Make sure the search suggestions are enabled, and the search matches the minimum autocomplete length. - if(!Config::inst()->get('ExtensibleSearchSuggestion', 'enable_suggestions') || (strlen($term) < 3)) { + if(!Config::inst()->get(ExtensibleSearchSuggestion::class, 'enable_suggestions') || (strlen($term) < 3)) { return null; } diff --git a/tests/UnitTests.php b/tests/UnitTests.php index b77a87a..875e118 100644 --- a/tests/UnitTests.php +++ b/tests/UnitTests.php @@ -79,22 +79,9 @@ public function testSearchResults() { public function testAnalytics() { - // The full-text search needs to be selected. - $page = ExtensibleSearchPage::get()->first(); - $page->SearchEngine = 'Full-Text'; - $page->write(); $controller = ModelAsController::controller_for($page); - // Instantiate a searchable page. - - $searchable = SiteTree::create( - array( - 'Title' => 'Test' - ) - ); - $searchable->write(); - // This shouldn't find anything, since the query doesn't match the page. $data = array(