From: Umherirrender Date: Fri, 1 Feb 2019 20:57:58 +0000 (+0100) Subject: Add missing @covers to search related tests X-Git-Tag: 1.34.0-rc.0~2961^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/%28%5B%5E/%40lib_url%40?a=commitdiff_plain;h=ca1a101d97cf28c9b7b9d9ba6019e7564609204b;p=lhc%2Fweb%2Fwiklou.git Add missing @covers to search related tests Change-Id: Iba122ad763a5728a7ddb487b3d01d679de6845e5 --- diff --git a/tests/phpunit/includes/search/SearchEnginePrefixTest.php b/tests/phpunit/includes/search/SearchEnginePrefixTest.php index ee272b9b5d..372cb33cbb 100644 --- a/tests/phpunit/includes/search/SearchEnginePrefixTest.php +++ b/tests/phpunit/includes/search/SearchEnginePrefixTest.php @@ -382,6 +382,7 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase { /** * @dataProvider paginationProvider + * @covers SearchSuggestionSet::hasMoreResults */ public function testPagination( $hasMoreResults, $provision ) { $search = $this->mockSearchWithResults( $provision ); diff --git a/tests/phpunit/includes/search/SearchSuggestionSetTest.php b/tests/phpunit/includes/search/SearchSuggestionSetTest.php index 54533a7333..02fa5e9cac 100644 --- a/tests/phpunit/includes/search/SearchSuggestionSetTest.php +++ b/tests/phpunit/includes/search/SearchSuggestionSetTest.php @@ -23,6 +23,7 @@ class SearchSuggestionSetTest extends \PHPUnit\Framework\TestCase { /** * Test that adding a new suggestion at the end * will keep proper score ordering + * @covers SearchSuggestionSet::append */ public function testAppend() { $set = SearchSuggestionSet::emptySuggestionSet(); @@ -54,6 +55,9 @@ class SearchSuggestionSetTest extends \PHPUnit\Framework\TestCase { /** * 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(); @@ -88,6 +92,9 @@ class SearchSuggestionSetTest extends \PHPUnit\Framework\TestCase { $this->assertEquals( $sorted, $scores ); } + /** + * @covers SearchSuggestionSet::shrink + */ public function testShrink() { $set = SearchSuggestionSet::emptySuggestionSet(); for ( $i = 0; $i < 100; $i++ ) { diff --git a/tests/phpunit/includes/specials/SpecialSearchTest.php b/tests/phpunit/includes/specials/SpecialSearchTest.php index 6ff2110ee3..1a4fe4f825 100644 --- a/tests/phpunit/includes/specials/SpecialSearchTest.php +++ b/tests/phpunit/includes/specials/SpecialSearchTest.php @@ -114,6 +114,7 @@ class SpecialSearchTest extends MediaWikiTestCase { /** * Verify we do not expand search term in on search result page * https://gerrit.wikimedia.org/r/4841 + * @covers SpecialSearch::setupPage */ public function testSearchTermIsNotExpanded() { $this->setMwGlobals( [ @@ -175,6 +176,7 @@ class SpecialSearchTest extends MediaWikiTestCase { /** * @dataProvider provideRewriteQueryWithSuggestion + * @covers SpecialSearch::showResults */ public function testRewriteQueryWithSuggestion( $message, @@ -224,6 +226,9 @@ class SpecialSearchTest extends MediaWikiTestCase { return $mock; } + /** + * @covers SpecialSearch::execute + */ public function testSubPageRedirect() { $this->setMwGlobals( [ 'wgScript' => '/w/index.php',