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

Change subject: Drop getFormattedIdForEntity methods from tests
......................................................................


Drop getFormattedIdForEntity methods from tests

I assume there once was a reason to have these methods. But it looks
like this reason is gone now that entity ids are always "formatted"
prefixed string serializations.

Change-Id: If4c3d8ab18347cb1335b983efc2965e764c77115
---
M lib/tests/phpunit/serializers/EntitySerializerBaseTest.php
M lib/tests/phpunit/serializers/ItemSerializerTest.php
M lib/tests/phpunit/serializers/PropertySerializerTest.php
3 files changed, 6 insertions(+), 10 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  WikidataJenkins: Verified
  jenkins-bot: Verified



diff --git a/lib/tests/phpunit/serializers/EntitySerializerBaseTest.php 
b/lib/tests/phpunit/serializers/EntitySerializerBaseTest.php
index dd28478..e520960 100644
--- a/lib/tests/phpunit/serializers/EntitySerializerBaseTest.php
+++ b/lib/tests/phpunit/serializers/EntitySerializerBaseTest.php
@@ -61,7 +61,7 @@
                $validArgs[] = array(
                        $entity0,
                        array(
-                               'id' => $this->getFormattedIdForEntity( 
$entity0 ),
+                               'id' => $entity0->getId()->getSerialization(),
                                'type' => $entity0->getType(),
                                'aliases' => array(
                                        'en' => array(
@@ -101,7 +101,7 @@
                $validArgs[] = array(
                        $entity1,
                        array(
-                               'id' => $this->getFormattedIdForEntity( 
$entity1 ),
+                               'id' => $entity1->getId()->getSerialization(),
                                'type' => $entity1->getType(),
                                'labels' => array(
                                        'en' => array(
@@ -150,7 +150,7 @@
                $validArgs[] = array(
                        $entity2,
                        array(
-                               'id' => $this->getFormattedIdForEntity( 
$entity2 ),
+                               'id' => $entity2->getId()->getSerialization(),
                                'type' => $entity2->getType(),
                                'labels' => array(
                                        'en' => array(
@@ -179,10 +179,6 @@
                );
 
                return $validArgs;
-       }
-
-       protected function getFormattedIdForEntity( Entity $entity ) {
-               return $entity->getId()->getSerialization();
        }
 
 }
diff --git a/lib/tests/phpunit/serializers/ItemSerializerTest.php 
b/lib/tests/phpunit/serializers/ItemSerializerTest.php
index 747a562..09d6046 100644
--- a/lib/tests/phpunit/serializers/ItemSerializerTest.php
+++ b/lib/tests/phpunit/serializers/ItemSerializerTest.php
@@ -65,7 +65,7 @@
                $validArgs[] = array(
                        $item,
                        array(
-                               'id' => $this->getFormattedIdForEntity( $item ),
+                               'id' => $item->getId()->getSerialization(),
                                'type' => $item->getType(),
                        ),
                );
@@ -76,7 +76,7 @@
                $validArgs[] = array(
                        $item,
                        array(
-                               'id' => $this->getFormattedIdForEntity( $item ),
+                               'id' => $item->getId()->getSerialization(),
                                'type' => $item->getType(),
                        ),
                        $options
diff --git a/lib/tests/phpunit/serializers/PropertySerializerTest.php 
b/lib/tests/phpunit/serializers/PropertySerializerTest.php
index 86c8e35..ec7f8e1 100644
--- a/lib/tests/phpunit/serializers/PropertySerializerTest.php
+++ b/lib/tests/phpunit/serializers/PropertySerializerTest.php
@@ -64,7 +64,7 @@
                $validArgs[] = array(
                        $property,
                        array(
-                               'id' => $this->getFormattedIdForEntity( 
$property ),
+                               'id' => $property->getId()->getSerialization(),
                                'type' => $property->getType(),
                                'datatype' => $property->getDataTypeId()
                        )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4c3d8ab18347cb1335b983efc2965e764c77115
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to