$wgSearchType needs to be controlled for at time the pages get created. This patch sets the $wgSearchType global. Also, the 'singleton' is removed from SearchEngine::getSearchTypes, which appears to provide little or no benefit while binding all tests to the global variable. SearchEngine::getSearchTypes() gets called in SearchUpdate which is run on page edits. This means the first page edit in the entire test suite causes the global variable to be set and subsequent tests cannot override it. These changes allow SearchEngineTest to pass, even if one has CirrusSearch or other such extensions enabled. Change-Id: I39050da8659dc69db31125f469f494a5fb4b8fca |
||
|---|---|---|
| .. | ||
| SearchEngineTest.php | ||
| SearchUpdateTest.php | ||