dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop wfRunHooks, deprecated since 1.25
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
PrefixSearchTest.php
diff --git
a/tests/phpunit/includes/PrefixSearchTest.php
b/tests/phpunit/includes/PrefixSearchTest.php
index
f12fe1d
..
685cb40
100644
(file)
--- a/
tests/phpunit/includes/PrefixSearchTest.php
+++ b/
tests/phpunit/includes/PrefixSearchTest.php
@@
-50,7
+50,7
@@
class PrefixSearchTest extends MediaWikiLangTestCase {
$this->markTestSkipped( 'Main namespace does not support wikitext.' );
}
$this->markTestSkipped( 'Main namespace does not support wikitext.' );
}
- // Avoid special pages from extensions interfer
r
ing with the tests
+ // Avoid special pages from extensions interfering with the tests
$this->setMwGlobals( [
'wgSpecialPages' => [],
'wgHooks' => [],
$this->setMwGlobals( [
'wgSpecialPages' => [],
'wgHooks' => [],
@@
-61,22
+61,13
@@
class PrefixSearchTest extends MediaWikiLangTestCase {
$this->originalHandlers = TestingAccessWrapper::newFromClass( Hooks::class )->handlers;
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = [];
$this->originalHandlers = TestingAccessWrapper::newFromClass( Hooks::class )->handlers;
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = [];
- // Clear caches so that our new namespace appears
- MWNamespace::clearCaches();
- Language::factory( 'en' )->resetNamespaces();
-
- SpecialPageFactory::resetList();
+ $this->overrideMwServices();
}
public function tearDown() {
}
public function tearDown() {
- MWNamespace::clearCaches();
- Language::factory( 'en' )->resetNamespaces();
-
parent::tearDown();
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = $this->originalHandlers;
parent::tearDown();
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = $this->originalHandlers;
-
- SpecialPageFactory::resetList();
}
protected function searchProvision( array $results = null ) {
}
protected function searchProvision( array $results = null ) {