mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-30 19:16:01 +00:00
build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
Additional changes: * Also sorted "composer fix" command to run phpcbf last. Change-Id: I5e714b548aa11857b5631df94c075fa0e4e7ce81
This commit is contained in:
parent
586a64e657
commit
712d006ba3
|
@ -2,14 +2,14 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"jakub-onderka/php-parallel-lint": "1.0.0",
|
"jakub-onderka/php-parallel-lint": "1.0.0",
|
||||||
"jakub-onderka/php-console-highlighter": "0.3.2",
|
"jakub-onderka/php-console-highlighter": "0.3.2",
|
||||||
"mediawiki/mediawiki-codesniffer": "28.0.0",
|
"mediawiki/mediawiki-codesniffer": "29.0.0",
|
||||||
"mediawiki/minus-x": "0.3.2",
|
"mediawiki/minus-x": "0.3.2",
|
||||||
"mediawiki/mediawiki-phan-config": "0.9.0"
|
"mediawiki/mediawiki-phan-config": "0.9.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"fix": [
|
"fix": [
|
||||||
"phpcbf",
|
"minus-x fix .",
|
||||||
"minus-x fix ."
|
"phpcbf"
|
||||||
],
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"parallel-lint . --exclude vendor --exclude node_modules",
|
"parallel-lint . --exclude vendor --exclude node_modules",
|
||||||
|
|
|
@ -9,8 +9,8 @@ use FormatMetadata;
|
||||||
use Http;
|
use Http;
|
||||||
use LinksUpdate;
|
use LinksUpdate;
|
||||||
use PageImages;
|
use PageImages;
|
||||||
use Title;
|
|
||||||
use Revision;
|
use Revision;
|
||||||
|
use Title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for the "LinksUpdate" hook.
|
* Handler for the "LinksUpdate" hook.
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ApiQueryPageImagesTest extends \PHPUnit\Framework\TestCase {
|
||||||
public function testGetAllowedParams() {
|
public function testGetAllowedParams() {
|
||||||
$instance = $this->newInstance();
|
$instance = $this->newInstance();
|
||||||
$params = $instance->getAllowedParams();
|
$params = $instance->getAllowedParams();
|
||||||
$this->assertInternalType( 'array', $params );
|
$this->assertIsArray( $params );
|
||||||
$this->assertNotEmpty( $params );
|
$this->assertNotEmpty( $params );
|
||||||
$this->assertContainsOnly( 'array', $params );
|
$this->assertContainsOnly( 'array', $params );
|
||||||
$this->assertArrayHasKey( 'limit', $params );
|
$this->assertArrayHasKey( 'limit', $params );
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
namespace PageImages\Tests\Hooks;
|
namespace PageImages\Tests\Hooks;
|
||||||
|
|
||||||
use LinksUpdate;
|
use LinksUpdate;
|
||||||
|
use MediaWikiTestCase;
|
||||||
use PageImages;
|
use PageImages;
|
||||||
use PageImages\Hooks\LinksUpdateHookHandler;
|
use PageImages\Hooks\LinksUpdateHookHandler;
|
||||||
use ParserOutput;
|
use ParserOutput;
|
||||||
use MediaWikiTestCase;
|
|
||||||
use RepoGroup;
|
use RepoGroup;
|
||||||
use Title;
|
use Title;
|
||||||
use Wikimedia\TestingAccessWrapper;
|
use Wikimedia\TestingAccessWrapper;
|
||||||
|
@ -148,13 +148,13 @@ class LinksUpdateHookHandlerTest extends MediaWikiTestCase {
|
||||||
$mock->doLinksUpdate( $linksUpdate );
|
$mock->doLinksUpdate( $linksUpdate );
|
||||||
|
|
||||||
$this->assertTrue( property_exists( $linksUpdate, 'mProperties' ), 'precondition' );
|
$this->assertTrue( property_exists( $linksUpdate, 'mProperties' ), 'precondition' );
|
||||||
if ( is_null( $expectedFreeFileName ) ) {
|
if ( $expectedFreeFileName === null ) {
|
||||||
$this->assertArrayNotHasKey( PageImages::PROP_NAME_FREE, $linksUpdate->mProperties );
|
$this->assertArrayNotHasKey( PageImages::PROP_NAME_FREE, $linksUpdate->mProperties );
|
||||||
} else {
|
} else {
|
||||||
$this->assertSame( $expectedFreeFileName,
|
$this->assertSame( $expectedFreeFileName,
|
||||||
$linksUpdate->mProperties[PageImages::PROP_NAME_FREE] );
|
$linksUpdate->mProperties[PageImages::PROP_NAME_FREE] );
|
||||||
}
|
}
|
||||||
if ( is_null( $expectedNonFreeFileName ) ) {
|
if ( $expectedNonFreeFileName === null ) {
|
||||||
$this->assertArrayNotHasKey( PageImages::PROP_NAME, $linksUpdate->mProperties );
|
$this->assertArrayNotHasKey( PageImages::PROP_NAME, $linksUpdate->mProperties );
|
||||||
} else {
|
} else {
|
||||||
$this->assertSame( $expectedNonFreeFileName, $linksUpdate->mProperties[PageImages::PROP_NAME] );
|
$this->assertSame( $expectedNonFreeFileName, $linksUpdate->mProperties[PageImages::PROP_NAME] );
|
||||||
|
|
Loading…
Reference in a new issue