Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/81545
Change subject: Improvements to PropertyValueSnakTest
......................................................................
Improvements to PropertyValueSnakTest
Change-Id: I92477c34e0b77515ac65da86da324d92ddcccf3a
---
M tests/phpunit/Snak/PropertyValueSnakTest.php
1 file changed, 9 insertions(+), 8 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel
refs/changes/45/81545/1
diff --git a/tests/phpunit/Snak/PropertyValueSnakTest.php
b/tests/phpunit/Snak/PropertyValueSnakTest.php
index 61afcb8..e79b019 100644
--- a/tests/phpunit/Snak/PropertyValueSnakTest.php
+++ b/tests/phpunit/Snak/PropertyValueSnakTest.php
@@ -4,7 +4,8 @@
use DataValues\StringValue;
use DataValues\UnDeserializableValue;
-use Wikibase\EntityId;
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
use Wikibase\Property;
use Wikibase\PropertyValueSnak;
@@ -30,13 +31,13 @@
public function constructorProvider() {
$argLists = array(
- array( true, 1, new StringValue( 'a' ) ),
- array( true, 9001, new StringValue( 'a' ) ),
+ array( true, 'P1', new StringValue( 'a' ) ),
+ array( true, 'P9001', new StringValue( 'a' ) ),
);
foreach ( $argLists as &$argList ) {
if ( count( $argList ) > 1 ) {
- $argList[1] = new \Wikibase\EntityId(
\Wikibase\Property::ENTITY_TYPE, $argList[1] );
+ $argList[1] = new PropertyId( $argList[1] );
}
}
@@ -62,12 +63,12 @@
$property = \Wikibase\Property::newFromType( 'wikibase-item' );
$property->setId( 852645 );
- $argLists[] = array( clone $property, new \Wikibase\EntityId(
\Wikibase\Item::ENTITY_TYPE, 42 ) );
- $argLists[] = array( clone $property, new \Wikibase\EntityId(
\Wikibase\Item::ENTITY_TYPE, 9001 ) );
+ $argLists[] = array( clone $property, new ItemId( 'Q42' ) );
+ $argLists[] = array( clone $property, new ItemId( 'Q9001' ) );
$property->setId( 852642 );
- $argLists[] = array( clone $property, new \Wikibase\EntityId(
\Wikibase\Item::ENTITY_TYPE, 9001 ) );
+ $argLists[] = array( clone $property, new ItemId( 'Q9001' ) );
$property->setDataTypeId( 'commonsMedia' );
@@ -86,7 +87,7 @@
}
public static function toArrayProvider() {
- $q1 = new EntityId( Property::ENTITY_TYPE, 1 );
+ $q1 = new PropertyId( 'P1' );
return array(
'string-value' => array(
--
To view, visit https://gerrit.wikimedia.org/r/81545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92477c34e0b77515ac65da86da324d92ddcccf3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseDataModel
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits