'wgCapitalLinks' => true,
'wgCapitalLinkOverrides' => [
NS_CATEGORY => false // for testCompletionSearchMustRespectCapitalLinkOverrides
- ]
+ ],
] );
$lb = LoadBalancerSingle::newFromConnection( $this->db );
'wgCapitalLinks' => true,
'wgCapitalLinkOverrides' => [
NS_CATEGORY => false // for testCompletionSearchMustRespectCapitalLinkOverrides
- ]
+ ],
] );
$this->insertPage( 'Not_Main_Page', 'This is not a main page' );
$mockField =
$this->getMockBuilder( SearchIndexFieldDefinition::class )->setConstructorArgs( [
$name,
- $type
+ $type,
] )->getMock();
$mockField->expects( $this->any() )->method( 'getMapping' )->willReturn( [
$setAugmentor = $this->createMock( ResultSetAugmentor::class );
$setAugmentor->expects( $this->once() )
->method( 'augmentAll' )
- ->willReturnCallback( function ( SearchResultSet $resultSet ) {
+ ->willReturnCallback( function ( ISearchResultSet $resultSet ) {
$data = [];
+ /** @var SearchResult $result */
foreach ( $resultSet as $result ) {
$id = $result->getTitle()->getArticleID();
$data[$id] = "Result:$id:" . $result->getTitle()->getText();
[
'query' => 'foo',
],
- false
+ false,
],
'empty' => [
[
'query' => 'all:test',
'withAll' => false,
],
- false
+ false,
],
'ns only' => [
[
'query' => 'help:',
],
- [ '', [ NS_HELP ] ]
+ [ '', [ NS_HELP ] ],
],
'all only' => [
[
'query' => 'all:',
'withAll' => true,
],
- [ '', null ]
+ [ '', null ],
],
'all wins over namespace when first' => [
[
'query' => 'all:help:test',
'withAll' => true,
],
- [ 'help:test', null ]
+ [ 'help:test', null ],
],
'ns wins over all when first' => [
[
'query' => 'help:all:test',
'withAll' => true,
],
- [ 'all:test', [ NS_HELP ] ]
+ [ 'all:test', [ NS_HELP ] ],
],
];
}