/**
* @dataProvider paginationProvider
+ * @covers SearchSuggestionSet::hasMoreResults
*/
public function testPagination( $hasMoreResults, $provision ) {
$search = $this->mockSearchWithResults( $provision );
/**
* Test that adding a new suggestion at the end
* will keep proper score ordering
+ * @covers SearchSuggestionSet::append
*/
public function testAppend() {
$set = SearchSuggestionSet::emptySuggestionSet();
/**
* Test that adding a new best suggestion will keep proper score
* ordering
+ * @covers SearchSuggestionSet::getWorstScore
+ * @covers SearchSuggestionSet::getBestScore
+ * @covers SearchSuggestionSet::prepend
*/
public function testInsertBest() {
$set = SearchSuggestionSet::emptySuggestionSet();
$this->assertEquals( $sorted, $scores );
}
+ /**
+ * @covers SearchSuggestionSet::shrink
+ */
public function testShrink() {
$set = SearchSuggestionSet::emptySuggestionSet();
for ( $i = 0; $i < 100; $i++ ) {
/**
* Verify we do not expand search term in <title> on search result page
* https://gerrit.wikimedia.org/r/4841
+ * @covers SpecialSearch::setupPage
*/
public function testSearchTermIsNotExpanded() {
$this->setMwGlobals( [
/**
* @dataProvider provideRewriteQueryWithSuggestion
+ * @covers SpecialSearch::showResults
*/
public function testRewriteQueryWithSuggestion(
$message,
return $mock;
}
+ /**
+ * @covers SpecialSearch::execute
+ */
public function testSubPageRedirect() {
$this->setMwGlobals( [
'wgScript' => '/w/index.php',