diff --git a/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php b/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php index 5f9a857..9119d0b 100644 --- a/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php +++ b/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php @@ -5,6 +5,7 @@ use LoadBalancerSingle; use InvalidArgumentException; use MediaWikiTestCase; +use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; @@ -69,7 +70,7 @@ public function testSuggestByPropertyIds() { public function testSuggestByItem() { $item = Item::newEmpty(); $item->setId( new ItemId( 'Q42' ) ); - $statement = new Statement( new PropertySomeValueSnak( new PropertyId( 'P1' ) ) ); + $statement = new Statement( new Claim( new PropertySomeValueSnak( new PropertyId( 'P1' ) ) ) ); $statement->setGuid( 'claim0' ); $item->addClaim( $statement ); diff --git a/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php b/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php index 1e4b4b8..ca03b3d 100644 --- a/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php +++ b/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php @@ -5,6 +5,7 @@ use MediaWikiTestCase; use PropertySuggester\Suggesters\SuggesterEngine; use PropertySuggester\Suggesters\Suggestion; +use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Snak\PropertySomeValueSnak; @@ -104,7 +105,7 @@ public function testGenerateSuggestionsWithPropertyList() { public function testGenerateSuggestionsWithItem() { $item = Item::newEmpty(); $item->setId( new ItemId( 'Q42' ) ); - $statement = new Statement( new PropertySomeValueSnak( new PropertyId( 'P12' ) ) ); + $statement = new Statement( new Claim( new PropertySomeValueSnak( new PropertyId( 'P12' ) ) ) ); $statement->setGuid( 'claim0' ); // otherwise "InvalidArgumentException: Can't add a Claim without a GUID." $item->addClaim( $statement );