From: Stanislav Malyshev Date: Thu, 23 Jun 2016 22:38:15 +0000 (-0700) Subject: Fix unit tests running on non-DB environment X-Git-Tag: 1.31.0-rc.0~6532 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=68cdf61e579d600afb98b19602a50395ac39be55;p=lhc%2Fweb%2Fwiklou.git Fix unit tests running on non-DB environment Bug: T138551 Change-Id: Ie1d3c8b24e5271d4e12f4190400531cbe606bfd4 --- diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php index 055e982377..40a33d9ab5 100644 --- a/tests/phpunit/includes/search/SearchEngineTest.php +++ b/tests/phpunit/includes/search/SearchEngineTest.php @@ -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',