Merge "ApiParse: Deprecate prop=headitems"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 28 Jul 2016 17:54:50 +0000 (17:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 28 Jul 2016 17:54:50 +0000 (17:54 +0000)
includes/api/ApiOpenSearch.php
tests/phpunit/includes/api/ApiOpenSearchTest.php

index b13ba58..ace776c 100644 (file)
@@ -294,7 +294,7 @@ class ApiOpenSearch extends ApiBase {
 
        public function getSearchProfileParams() {
                return [
-                       'qiprofile' => [
+                       'profile' => [
                                'profile-type' => SearchEngine::COMPLETION_PROFILE_TYPE,
                                'help-message' => 'apihelp-query+prefixsearch-param-profile'
                        ],
index fd5b3a9..39e90c2 100644 (file)
@@ -30,8 +30,8 @@ class ApiOpenSearchTest extends MediaWikiTestCase {
                $params = $api->getAllowedParams();
 
                $this->assertArrayNotHasKey( 'offset', $params );
-               $this->assertArrayHasKey( 'qiprofile', $params, print_r( $params, true ) );
-               $this->assertEquals( 'normal', $params['qiprofile'][ApiBase::PARAM_DFLT] );
+               $this->assertArrayHasKey( 'profile', $params, print_r( $params, true ) );
+               $this->assertEquals( 'normal', $params['profile'][ApiBase::PARAM_DFLT] );
        }
 
        private function replaceSearchEngineConfig() {