Daniel Kinzler has uploaded a new change for review.

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

Change subject: Avoid hardcoded property IDs in SetClaimTest
......................................................................

Avoid hardcoded property IDs in SetClaimTest

Change-Id: I14d337fb817508ece6ee237ea9e5f45810e6bd5d
---
M repo/tests/phpunit/includes/api/SetClaimTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/api/SetClaimTest.php 
b/repo/tests/phpunit/includes/api/SetClaimTest.php
index e42e58b..2bea9d6 100644
--- a/repo/tests/phpunit/includes/api/SetClaimTest.php
+++ b/repo/tests/phpunit/includes/api/SetClaimTest.php
@@ -275,7 +275,7 @@
                // Generate a single claim:
                $itemId = $content->getItem()->getId();
                $guidGenerator = new ClaimGuidGenerator( $itemId );
-               $preexistingClaim = $item->newClaim( new PropertyNoValueSnak( 1 
) );
+               $preexistingClaim = $item->newClaim( new PropertyNoValueSnak( 
self::$propertyIds[1] ) );
                $preexistingClaim->setGuid( $guidGenerator->newGuid() );
                $claims->addClaim( $preexistingClaim );
 
@@ -290,7 +290,7 @@
                $revision = $statusValue['revision'];
 
                // Add new claim at index 3 using the baserevid and a different 
property id
-               $newClaim = $item->newClaim( new PropertyNoValueSnak( 2 ) );
+               $newClaim = $item->newClaim( new PropertyNoValueSnak( 
self::$propertyIds[2] ) );
                $newClaim->setGuid( $guidGenerator->newGuid() );
                $this->makeRequest( $newClaim, $itemId, 2, 'addition request', 
3, $revision->getId() );
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14d337fb817508ece6ee237ea9e5f45810e6bd5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>

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

Reply via email to