Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/250729

Change subject: Remove dead code
......................................................................

Remove dead code

Change-Id: Ic4e3e780fe3f9ef1ff548f7f89f714454480b7b3
---
M repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php
M repo/tests/phpunit/includes/Validators/SnakValidatorTest.php
M repo/tests/phpunit/includes/content/EntityHandlerTest.php
3 files changed, 11 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/29/250729/1

diff --git 
a/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php 
b/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php
index b5a096f..499caef 100644
--- a/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/SiteLinkChangeOpFactoryTest.php
@@ -29,7 +29,7 @@
        }
 
        public function testNewRemoveSiteLinkOp() {
-               $op = $this->newChangeOpFactory()->newRemoveSiteLinkOp( 
'enwiki', 'Foo' );
+               $op = $this->newChangeOpFactory()->newRemoveSiteLinkOp( 
'enwiki' );
                $this->assertInstanceOf( 'Wikibase\ChangeOp\ChangeOp', $op );
        }
 
diff --git a/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php 
b/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php
index 57bb127..20c83ab 100644
--- a/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php
+++ b/repo/tests/phpunit/includes/Validators/SnakValidatorTest.php
@@ -275,23 +275,23 @@
 
        public function provideValidateDataValue() {
                return array(
-                       array( new StringValue( '123' ), 'numeric', 'p1', 
'valid numeric value', true ),
-                       array( new StringValue( '123' ), 'alphabetic', 'p2', 
'invalid alphabetic value', false ),
-                       array( new StringValue( 'abc' ), 'alphabetic', 'p2', 
'valid alphabetic value', true ),
-                       array( new StringValue( 'abc' ), 'numeric', 'p1', 
'invalid numeric value', false ),
-                       array( new StringValue( '01234567890123456789' ), 
'numeric', 'p1', 'overly long numeric value', false ),
-                       array( new UnknownValue( 'abc' ), 'alphabetic', 'p2', 
'bad value type', false ),
-                       array( new UnDeserializableValue( 'abc', 'string', 
'error' ), 'numeric', 'p1', 'bad value', false ),
+                       array( new StringValue( '123' ), 'numeric', 'valid 
numeric value', true ),
+                       array( new StringValue( '123' ), 'alphabetic', 'invalid 
alphabetic value', false ),
+                       array( new StringValue( 'abc' ), 'alphabetic', 'valid 
alphabetic value', true ),
+                       array( new StringValue( 'abc' ), 'numeric', 'invalid 
numeric value', false ),
+                       array( new StringValue( '01234567890123456789' ), 
'numeric', 'overly long numeric value', false ),
+                       array( new UnknownValue( 'abc' ), 'alphabetic', 'bad 
value type', false ),
+                       array( new UnDeserializableValue( 'abc', 'string', 
'error' ), 'numeric', 'bad value', false ),
                );
        }
 
        /**
         * @dataProvider provideValidateDataValue
         */
-       public function testValidateDataValue( DataValue $dataValue, 
$dataTypeId, $propertyName, $description, $expectedValid = true ) {
+       public function testValidateDataValue( DataValue $dataValue, 
$dataTypeId, $description, $expectedValid = true ) {
                $validator = $this->getSnakValidator();
 
-               $result = $validator->validateDataValue( $dataValue, 
$dataTypeId, $propertyName );
+               $result = $validator->validateDataValue( $dataValue, 
$dataTypeId );
 
                $this->assertEquals( $expectedValid, $result->isValid(), 
$description );
        }
diff --git a/repo/tests/phpunit/includes/content/EntityHandlerTest.php 
b/repo/tests/phpunit/includes/content/EntityHandlerTest.php
index 15b5d3a..2fac6a4 100644
--- a/repo/tests/phpunit/includes/content/EntityHandlerTest.php
+++ b/repo/tests/phpunit/includes/content/EntityHandlerTest.php
@@ -408,14 +408,6 @@
        }
 
        public function testExportTransform_neverRecodeNonLegacyFormat() {
-               $codec = $this->getMockBuilder( 
'Wikibase\Lib\Store\EntityContentDataCodec' )
-                       ->disableOriginalConstructor()
-                       ->getMock();
-               $codec->expects( $this->never() )
-                       ->method( 'decodeEntity' );
-               $codec->expects( $this->never() )
-                       ->method( 'encodeEntity' );
-
                $settings = new SettingsArray();
                $settings->setSetting( 'transformLegacyFormatOnExport', true );
 
@@ -423,7 +415,7 @@
                $currentSerializer = $this->getWikibaseRepo( $settings 
)->getInternalEntitySerializer();
                $expected = json_encode( $currentSerializer->serialize( $entity 
) );
 
-               $handler = $this->getHandler( $settings, $codec );
+               $handler = $this->getHandler( $settings );
                $actual = $handler->exportTransform( $expected );
 
                $this->assertEquals( $expected, $actual );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4e3e780fe3f9ef1ff548f7f89f714454480b7b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

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

Reply via email to