Merge "API: return free images by default"

This commit is contained in:
jenkins-bot 2017-01-24 20:11:53 +00:00 committed by Gerrit Code Review
commit d07a770a54
2 changed files with 2 additions and 2 deletions

View file

@ -264,7 +264,7 @@ class ApiQueryPageImages extends ApiQueryBase {
'license' => [
ApiBase::PARAM_TYPE => [ self::PARAM_LICENSE_FREE, self::PARAM_LICENSE_ANY ],
ApiBase::PARAM_ISMULTI => false,
ApiBase::PARAM_DFLT => self::PARAM_LICENSE_ANY,
ApiBase::PARAM_DFLT => self::PARAM_LICENSE_FREE,
],
'continue' => [
ApiBase::PARAM_TYPE => 'integer',

View file

@ -105,7 +105,7 @@ class ApiQueryPageImagesTest extends PHPUnit_Framework_TestCase {
$this->assertContainsOnly( 'array', $params );
$this->assertArrayHasKey( 'license', $params );
$this->assertEquals( $params['license'][\ApiBase::PARAM_TYPE], [ 'free', 'any' ] );
$this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'any' );
$this->assertEquals( $params['license'][\ApiBase::PARAM_DFLT], 'free' );
$this->assertEquals( $params['license'][\ApiBase::PARAM_ISMULTI], false );
}