jenkins-bot has submitted this change and it was merged.
Change subject: Remove one more usage of EntityId::newFromPrefixedId
......................................................................
Remove one more usage of EntityId::newFromPrefixedId
Change-Id: I89f86a52476e157cfe69424aa8417474ba9fbf8d
---
M lib/tests/phpunit/EntityLookupTest.php
1 file changed, 6 insertions(+), 11 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/tests/phpunit/EntityLookupTest.php
b/lib/tests/phpunit/EntityLookupTest.php
index 3445c02..3e8140b 100644
--- a/lib/tests/phpunit/EntityLookupTest.php
+++ b/lib/tests/phpunit/EntityLookupTest.php
@@ -10,7 +10,6 @@
use Wikibase\Query;
use Wikibase\EntityLookup;
use Wikibase\Property;
-use DataTypes\DataTypeFactory;
/**
* Base class for testing EntityLookup implementations
@@ -24,7 +23,7 @@
abstract class EntityLookupTest extends EntityTestCase {
/**
- * @param Entity[] $entities
+ * @param Entity[] $entities
*
* @todo: Support for multiple revisions per entity.
* Needs a way to return the revision IDs.
@@ -136,13 +135,13 @@
public static function provideHasEntity() {
$cases = array(
array( // #0
- 'q42', true,
+ new ItemId( 'q42' ), true,
),
array( // #1
- 'q753', false,
+ new ItemId( 'q753' ), false,
),
array( // #2
- 'p753', true,
+ new PropertyId( 'p753' ), true,
),
);
@@ -152,14 +151,10 @@
/**
* @dataProvider provideHasEntity
*
- * @param string|EntityId $id The entity to check
+ * @param EntityId $id The entity to check
* @param bool $expected
*/
- public function testHasEntity( $id, $expected ) {
- if ( is_string( $id ) ) {
- $id = EntityId::newFromPrefixedId( $id );
- }
-
+ public function testHasEntity( EntityId $id, $expected ) {
$lookup = $this->getLookup();
$result = $lookup->hasEntity( $id );
--
To view, visit https://gerrit.wikimedia.org/r/94920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I89f86a52476e157cfe69424aa8417474ba9fbf8d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits