Add missing @covers to search related tests
authorUmherirrender <umherirrender_de.wp@web.de>
Fri, 1 Feb 2019 20:57:58 +0000 (21:57 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 1 Feb 2019 21:35:26 +0000 (21:35 +0000)
Change-Id: Iba122ad763a5728a7ddb487b3d01d679de6845e5

tests/phpunit/includes/search/SearchEnginePrefixTest.php
tests/phpunit/includes/search/SearchSuggestionSetTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php

index ee272b9..372cb33 100644 (file)
@@ -382,6 +382,7 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider paginationProvider
+        * @covers SearchSuggestionSet::hasMoreResults
         */
        public function testPagination( $hasMoreResults, $provision ) {
                $search = $this->mockSearchWithResults( $provision );
index 54533a7..02fa5e9 100644 (file)
@@ -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++ ) {
index 6ff2110..1a4fe4f 100644 (file)
@@ -114,6 +114,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
        /**
         * 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( [
@@ -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',