diff --git a/composer.json b/composer.json index 99aa15f..5626d20 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "prefer-stable": true, "require": { "php": ">=5.3.0", + "wikibase/data-model": "~2.5", "addwiki/mediawiki-api-base": "~0.2", "doctrine/cache": "~1.4", "ppp/wikibase-entity-store": "*", diff --git a/tests/phpunit/TreeSimplifier/MissingObjectTripleNodeSimplifierTest.php b/tests/phpunit/TreeSimplifier/MissingObjectTripleNodeSimplifierTest.php index 006fde2..a755fa3 100644 --- a/tests/phpunit/TreeSimplifier/MissingObjectTripleNodeSimplifierTest.php +++ b/tests/phpunit/TreeSimplifier/MissingObjectTripleNodeSimplifierTest.php @@ -110,7 +110,7 @@ public function simplificationProvider() { $list = array(); //Value - $douglasAdamItem = Item::newEmpty(); + $douglasAdamItem = new Item(); $douglasAdamItem->setId(new ItemId('Q42')); $birthPlaceStatement = new Statement(new Claim( new PropertyValueSnak(new PropertyId('P214'), new StringValue('113230702')) @@ -138,7 +138,7 @@ public function simplificationProvider() { ); //SomeValue - $douglasAdamItem = Item::newEmpty(); + $douglasAdamItem = new Item(); $douglasAdamItem->setId(new ItemId('Q42')); $birthPlaceStatement = new Statement(new Claim(new PropertySomeValueSnak(new PropertyId('P19')))); $birthPlaceStatement->setGuid('42'); @@ -155,7 +155,7 @@ public function simplificationProvider() { ); //No result - $douglasAdamItem = Item::newEmpty(); + $douglasAdamItem = new Item(); $douglasAdamItem->setId(new ItemId('Q42')); $list[] = array( new TripleNode( @@ -169,7 +169,7 @@ public function simplificationProvider() { ); //Parsing - $douglasAdamItem = Item::newEmpty(); + $douglasAdamItem = new Item(); $douglasAdamItem->setId(new ItemId('Q42')); $list[] = array( new TripleNode( diff --git a/tests/phpunit/ValueFormatters/WikibaseEntityIdFormatterTest.php b/tests/phpunit/ValueFormatters/WikibaseEntityIdFormatterTest.php index dec5772..108beaa 100644 --- a/tests/phpunit/ValueFormatters/WikibaseEntityIdFormatterTest.php +++ b/tests/phpunit/ValueFormatters/WikibaseEntityIdFormatterTest.php @@ -81,7 +81,7 @@ protected function getInstance(FormatterOptions $options) { } private function getQ42() { - $item = Item::newEmpty(); + $item = new Item(); $item->setId( new ItemId('Q42')); $item->getFingerprint()->setLabel('en', 'Douglas Adams'); diff --git a/tests/phpunit/ValueFormatters/WikibaseEntityIdJsonLdFormatterTest.php b/tests/phpunit/ValueFormatters/WikibaseEntityIdJsonLdFormatterTest.php index 3824a2e..13ea2f5 100644 --- a/tests/phpunit/ValueFormatters/WikibaseEntityIdJsonLdFormatterTest.php +++ b/tests/phpunit/ValueFormatters/WikibaseEntityIdJsonLdFormatterTest.php @@ -202,7 +202,7 @@ protected function getInstance(FormatterOptions $options) { } private function getQ42() { - $item = Item::newEmpty(); + $item = new Item(); $item->setId( new ItemId('Q42')); $item->getFingerprint()->setLabel('en', 'Douglas Adams'); $item->getFingerprint()->setDescription('en', 'Author'); diff --git a/tests/phpunit/ValueFormatters/WikibaseResourceNodeFormatterFactoryTest.php b/tests/phpunit/ValueFormatters/WikibaseResourceNodeFormatterFactoryTest.php index 737a670..5b3779a 100644 --- a/tests/phpunit/ValueFormatters/WikibaseResourceNodeFormatterFactoryTest.php +++ b/tests/phpunit/ValueFormatters/WikibaseResourceNodeFormatterFactoryTest.php @@ -160,7 +160,7 @@ public function testFormatterFormatWikibaseProperty() { } private function getQ42() { - $item = Item::newEmpty(); + $item = new Item(); $item->setId( new ItemId('Q42')); $item->getFingerprint()->setLabel('en', 'Douglas Adams');