Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334983 )

Change subject: Remove unused provider code from EntityChangeTest classes
......................................................................

Remove unused provider code from EntityChangeTest classes

Reviewing this should be super trivial: If it succeeds, it's fine. ;-)

Change-Id: I6875c0419b559b8ef0adfb9a6ec54f17e5abc2b9
---
M lib/tests/phpunit/Changes/EntityChangeTest.php
M lib/tests/phpunit/Changes/ItemChangeTest.php
M lib/tests/phpunit/Changes/TestChanges.php
3 files changed, 0 insertions(+), 53 deletions(-)


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

diff --git a/lib/tests/phpunit/Changes/EntityChangeTest.php 
b/lib/tests/phpunit/Changes/EntityChangeTest.php
index b31f2ca..9b29892 100644
--- a/lib/tests/phpunit/Changes/EntityChangeTest.php
+++ b/lib/tests/phpunit/Changes/EntityChangeTest.php
@@ -8,7 +8,6 @@
 use RuntimeException;
 use stdClass;
 use User;
-use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
@@ -43,15 +42,6 @@
                $entityChange = $changeFactory->newForEntity( 
EntityChange::UPDATE, $entityId );
 
                return $entityChange;
-       }
-
-       public function entityProvider() {
-               return array_map(
-                       function( EntityDocument $entity ) {
-                               return array( $entity );
-                       },
-                       TestChanges::getEntities()
-               );
        }
 
        public function changeProvider() {
diff --git a/lib/tests/phpunit/Changes/ItemChangeTest.php 
b/lib/tests/phpunit/Changes/ItemChangeTest.php
index 8419b18..38f6c44 100644
--- a/lib/tests/phpunit/Changes/ItemChangeTest.php
+++ b/lib/tests/phpunit/Changes/ItemChangeTest.php
@@ -5,8 +5,6 @@
 use Diff\DiffOp\Diff\Diff;
 use Diff\DiffOp\DiffOpChange;
 use Exception;
-use Wikibase\DataModel\Entity\EntityDocument;
-use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Services\Diff\ItemDiff;
 use Wikibase\EntityChange;
 use Wikibase\ItemChange;
@@ -29,22 +27,6 @@
         */
        protected function getRowClass() {
                return ItemChange::class;
-       }
-
-       public function entityProvider() {
-               $items = array_filter(
-                       TestChanges::getEntities(),
-                       function( EntityDocument $entity ) {
-                               return $entity instanceof Item;
-                       }
-               );
-
-               return array_map(
-                       function( Item $item ) {
-                               return array( $item );
-                       },
-                       $items
-               );
        }
 
        public function itemChangeProvider() {
diff --git a/lib/tests/phpunit/Changes/TestChanges.php 
b/lib/tests/phpunit/Changes/TestChanges.php
index 1e55a6f..96795d3 100644
--- a/lib/tests/phpunit/Changes/TestChanges.php
+++ b/lib/tests/phpunit/Changes/TestChanges.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Lib\Tests\Changes;
 
 use Wikibase\ChangeRow;
-use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\Property;
@@ -12,7 +11,6 @@
 use Wikibase\DataModel\Snak\PropertyNoValueSnak;
 use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\Statement\StatementList;
-use Wikibase\DataModel\Term\FingerprintProvider;
 use Wikibase\EntityChange;
 use Wikibase\ItemChange;
 use Wikibase\Lib\Changes\EntityChangeFactory;
@@ -230,29 +228,6 @@
                                $change->setField( $name, $value );
                        }
                }
-       }
-
-       /**
-        * @return EntityDocument[]
-        */
-       public static function getEntities() {
-               $entityList = array();
-
-               /** @var FingerprintProvider[] $entities */
-               $entities = array(
-                       new Item( new ItemId( 'Q112' ) ),
-                       new Property( new PropertyId( 'P112' ), null, 'string' 
),
-               );
-
-               foreach ( $entities as $entity ) {
-                       $entityList[] = $entity;
-
-                       $entity->getFingerprint()->setLabel( 'ja', 
'\u30d3\u30fc\u30eb' );
-
-                       $entityList[] = $entity;
-               }
-
-               return $entityList;
        }
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6875c0419b559b8ef0adfb9a6ec54f17e5abc2b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to