jenkins-bot has submitted this change and it was merged.

Change subject: Remove not needed nullable/optional parameters in tests
......................................................................


Remove not needed nullable/optional parameters in tests

Since this is test code, it is not "used" anywhere. When the tests
succeed, this is fine.

Change-Id: I0d414623f0b2f003d7d324c47be6c5f661253a7c
---
M lib/tests/phpunit/store/EntityInfoBuilderTest.php
M repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
M repo/tests/phpunit/includes/api/SetQualifierTest.php
M repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
4 files changed, 17 insertions(+), 11 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/tests/phpunit/store/EntityInfoBuilderTest.php 
b/lib/tests/phpunit/store/EntityInfoBuilderTest.php
index 1050d9e..dc26929 100644
--- a/lib/tests/phpunit/store/EntityInfoBuilderTest.php
+++ b/lib/tests/phpunit/store/EntityInfoBuilderTest.php
@@ -139,7 +139,7 @@
        /**
         * @dataProvider resolveRedirectsProvider
         */
-       public function testResolveRedirects( array $ids, array $expected = 
null ) {
+       public function testResolveRedirects( array $ids, array $expected ) {
                $builder = $this->newEntityInfoBuilder( $ids );
 
                $builder->resolveRedirects();
@@ -253,7 +253,12 @@
        /**
         * @dataProvider collectTermsProvider
         */
-       public function testCollectTerms( array $ids, array $types = null, 
array $languages = null, array $expected = null ) {
+       public function testCollectTerms(
+               array $ids,
+               array $types = null,
+               array $languages = null,
+               array $expected
+       ) {
                $builder = $this->newEntityInfoBuilder( $ids );
 
                $builder->collectTerms( $types, $languages );
@@ -327,7 +332,7 @@
        /**
         * @dataProvider collectDataTypesProvider
         */
-       public function testCollectDataTypes( array $ids, array $expected = 
null ) {
+       public function testCollectDataTypes( array $ids, array $expected ) {
                $builder = $this->newEntityInfoBuilder( $ids );
 
                $builder->collectDataTypes();
@@ -384,7 +389,7 @@
        /**
         * @dataProvider removeMissingAndRedirectsProvider
         */
-       public function testRemoveMissingAndRedirects( array $ids, array 
$expected = null ) {
+       public function testRemoveMissingAndRedirects( array $ids, array 
$expected ) {
                $builder = $this->newEntityInfoBuilder( $ids );
 
                $builder->removeMissing( 'remove-redirects' );
@@ -437,7 +442,7 @@
        /**
         * @dataProvider removeMissingButKeepRedirects
         */
-       public function testRemoveMissingButKeepRedirects( array $ids, array 
$expected = null ) {
+       public function testRemoveMissingButKeepRedirects( array $ids, array 
$expected ) {
                $builder = $this->newEntityInfoBuilder( $ids );
 
                $builder->removeMissing();
diff --git a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php 
b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
index df58c71..ffae5b0 100644
--- a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
+++ b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
@@ -54,9 +54,10 @@
 
        /**
         * @param mixed $itemId
+        *
         * @return SiteLinkLookup
         */
-       public function getSiteLinkLookupMock( $itemId = null ) {
+       private function getSiteLinkLookupMock( $itemId ) {
                $siteLinkLookupMock = $this->getMockBuilder( 
'\Wikibase\Lib\Store\SiteLinkLookup' )
                        ->disableOriginalConstructor()
                        ->getMock();
diff --git a/repo/tests/phpunit/includes/api/SetQualifierTest.php 
b/repo/tests/phpunit/includes/api/SetQualifierTest.php
index 1fc6850..7fa699d 100644
--- a/repo/tests/phpunit/includes/api/SetQualifierTest.php
+++ b/repo/tests/phpunit/includes/api/SetQualifierTest.php
@@ -55,7 +55,7 @@
         *
         * @return Snak
         */
-       public function getTestSnak( $type, $data = null ) {
+       private function getTestSnak( $type, $data ) {
                static $snaks = array();
 
                if ( !isset( $snaks[$type] ) ) {
@@ -141,7 +141,7 @@
        /**
         * @dataProvider provideChangeRequests
         */
-       public function testChangeRequests( $snakType, $data = null ) {
+       public function testChangeRequests( $snakType, $data ) {
                $item = $this->getTestItem();
                $statements = $item->getStatements()->toArray();
                /** @var Statement $statement */
diff --git 
a/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
 
b/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
index 552fd40..1667451 100644
--- 
a/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
+++ 
b/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
@@ -111,7 +111,7 @@
                        ->will( $this->returnCallback( function(
                                $entityType,
                                array $labels,
-                               array $descriptions = null,
+                               array $descriptions,
                                EntityId $ignoreEntityId = null
                        ) use ( $self ) {
                                $errors = array();
@@ -406,9 +406,9 @@
                $this->assertNotContains( '<', $output, 'no double 
escaping' );
        }
 
-       private function assetFingerprintEquals( Fingerprint $expected, 
Fingerprint $actual, $message = 'Fingerprint mismatches' ) {
+       private function assetFingerprintEquals( Fingerprint $expected, 
Fingerprint $actual ) {
                // TODO: Compare serializations.
-               $this->assertTrue( $expected->equals( $actual ), $message );
+               $this->assertTrue( $expected->equals( $actual ), 'Fingerprint 
mismatches' );
        }
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/263061
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d414623f0b2f003d7d324c47be6c5f661253a7c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Bene <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to