mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-15 03:43:46 +00:00
Merge "API: return free images by default"
This commit is contained in:
commit
d07a770a54
|
@ -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',
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue