$this->insertPage( 'Talk:Example' );
$this->insertPage( 'User:Example' );
+ $this->insertPage( 'Barcelona' );
+ $this->insertPage( 'Barbara' );
+ $this->insertPage( 'External' );
}
protected function setUp() {
$this->originalHandlers = TestingAccessWrapper::newFromClass( Hooks::class )->handlers;
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = [];
- SpecialPageFactory::resetList();
+ $this->overrideMwServices();
}
public function tearDown() {
TestingAccessWrapper::newFromClass( Hooks::class )->handlers = $this->originalHandlers;
- SpecialPageFactory::resetList();
+ $this->overrideMwServices();
}
protected function searchProvision( array $results = null ) {
],
] ],
[ [
- 'Exact match not on top (T72958)',
+ 'Exact match not in first result should be moved to the first result (T72958)',
'provision' => [
'Barcelona',
'Bar',
],
] ],
[ [
- 'Exact match missing (T72958)',
+ 'Exact match missing from results should be added as first result (T72958)',
'provision' => [
'Barcelona',
'Barbara',
],
] ],
[ [
- 'Exact match missing and not existing',
+ 'Exact match missing and not existing pages should be dropped',
'provision' => [
'Exile',
'Exist',
],
'query' => 'Ex',
'results' => [
- 'Exile',
- 'Exist',
'External',
],
] ],