Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/95344
Change subject: Fix random failing tests on travis
......................................................................
Fix random failing tests on travis
Change-Id: I84a37d64796a89c12cebd1260f578268a6fe3911
---
M repo/tests/phpunit/includes/api/SetReferenceTest.php
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/44/95344/1
diff --git a/repo/tests/phpunit/includes/api/SetReferenceTest.php
b/repo/tests/phpunit/includes/api/SetReferenceTest.php
index 1c506b2..900874b 100644
--- a/repo/tests/phpunit/includes/api/SetReferenceTest.php
+++ b/repo/tests/phpunit/includes/api/SetReferenceTest.php
@@ -5,6 +5,7 @@
use DataValues\StringValue;
use FormatJson;
use UsageException;
+use Wikibase\DataModel\Entity\PropertyId;
use Wikibase\Item;
use Wikibase\ItemContent;
use Wikibase\Lib\Serializers\SerializerFactory;
@@ -42,17 +43,17 @@
static $hasProperties = false;
if ( !$hasProperties ) {
$prop = PropertyContent::newEmpty();
- $prop->getEntity()->setId( 42 );
+ $prop->getEntity()->setId( new PropertyId( 'P42' ) );
$prop->getEntity()->setDataTypeId( 'string' );
$prop->save( 'testing' );
$prop = PropertyContent::newEmpty();
- $prop->getEntity()->setId( 43 );
+ $prop->getEntity()->setId( new PropertyId( 'P43' ) );
$prop->getEntity()->setDataTypeId( 'string' );
$prop->save( 'testing' );
$prop = PropertyContent::newEmpty();
- $prop->getEntity()->setId( 3 );
+ $prop->getEntity()->setId( new PropertyId( 'P66' ) );
$prop->getEntity()->setDataTypeId( 'string' );
$prop->save( 'testing' );
@@ -145,9 +146,9 @@
// Pre-fill statement with three references:
$references = array(
- new Reference( new SnakList( array( new
PropertySomeValueSnak( 1 ) ) ) ),
- new Reference( new SnakList( array( new
PropertySomeValueSnak( 2 ) ) ) ),
- new Reference( new SnakList( array( new
PropertySomeValueSnak( 3 ) ) ) ),
+ new Reference( new SnakList( array( new
PropertySomeValueSnak( 42 ) ) ) ),
+ new Reference( new SnakList( array( new
PropertySomeValueSnak( 43 ) ) ) ),
+ new Reference( new SnakList( array( new
PropertySomeValueSnak( 66 ) ) ) ),
);
foreach( $references as $reference ) {
--
To view, visit https://gerrit.wikimedia.org/r/95344
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84a37d64796a89c12cebd1260f578268a6fe3911
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits