Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/149497
Change subject: DM 1.0 compat: do not use Entity::toArray
......................................................................
DM 1.0 compat: do not use Entity::toArray
Change-Id: Id1911ec3019809548210f22366b05d0137b552a0
---
M repo/tests/phpunit/includes/EditEntityTest.php
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/97/149497/1
diff --git a/repo/tests/phpunit/includes/EditEntityTest.php
b/repo/tests/phpunit/includes/EditEntityTest.php
index 6380c6d..a03a8bf 100644
--- a/repo/tests/phpunit/includes/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/EditEntityTest.php
@@ -12,6 +12,7 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Term\Fingerprint;
use Wikibase\EditEntity;
use Wikibase\EntityPermissionChecker;
use Wikibase\EntityTitleLookup;
@@ -305,7 +306,7 @@
}
if ( $expectedData !== null ) {
- $data = $editEntity->getNewEntity()->toArray();
+ $data = $this->fingerprintToPartialArray(
$editEntity->getNewEntity()->getFingerprint() );
foreach ( $expectedData as $key => $expectedValue ) {
$actualValue = $data[$key];
@@ -314,6 +315,13 @@
}
}
+ private function fingerprintToPartialArray( Fingerprint $fingerprint ) {
+ return array(
+ 'label' => $fingerprint->getLabels()->toTextArray(),
+ 'description' =>
$fingerprint->getDescriptions()->toTextArray(),
+ );
+ }
+
public static function provideAttemptSaveWithLateConflict() {
return array(
array( true, true ),
--
To view, visit https://gerrit.wikimedia.org/r/149497
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1911ec3019809548210f22366b05d0137b552a0
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