Fix unit tests running on non-DB environment
authorStanislav Malyshev <smalyshev@gmail.com>
Thu, 23 Jun 2016 22:38:15 +0000 (15:38 -0700)
committerSmalyshev <smalyshev@wikimedia.org>
Fri, 24 Jun 2016 05:38:52 +0000 (05:38 +0000)
Bug: T138551
Change-Id: Ie1d3c8b24e5271d4e12f4190400531cbe606bfd4

tests/phpunit/includes/search/SearchEngineTest.php

index 055e982..40a33d9 100644 (file)
@@ -50,6 +50,10 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        return;
                }
 
+               // Reset the search type back to default - some extensions may have
+               // overridden it.
+               $this->setMwGlobals( [ 'wgSearchType' => null ] );
+
                $this->insertPage( 'Not_Main_Page', 'This is not a main page' );
                $this->insertPage(
                        'Talk:Not_Main_Page',