Lucas_Werkmeister_WMDE added a comment.
This is a relatively simple fix:
diff --git a/lib/tests/phpunit/Store/Sql/SqlChangeStoreTest.php
b/lib/tests/phpunit/Store/Sql/SqlChangeStoreTest.php
index 572379afaa..cca72807e1 100644
--- a/lib/tests/phpunit/Store/Sql/SqlChangeStoreTest.php
+++ b/lib/tests/phpunit/Store/Sql/SqlChangeStoreTest.php
@@ -15,6 +15,8 @@
use Wikibase\Lib\Changes\ItemChange;
use Wikibase\Lib\Store\Sql\SqlChangeStore;
use Wikibase\Lib\WikibaseSettings;
+use Wikibase\Repo\Notifications\RepoEntityChange;
+use Wikibase\Repo\Notifications\RepoItemChange;
/**
* @covers \Wikibase\Lib\Store\Sql\SqlChangeStore
@@ -179,14 +181,15 @@ public function testSaveChange_update() {
private function getEntityChangeFactory() {
$changeClasses = [
- Item::ENTITY_TYPE => ItemChange::class,
+ Item::ENTITY_TYPE => RepoItemChange::class,
// Other types of entities will use EntityChange
];
return new EntityChangeFactory(
new EntityDiffer(),
new ItemIdParser(),
- $changeClasses
+ $changeClasses,
+ RepoEntityChange::class
);
}
However, that reintroduces a coupling from Lib to Repo, which I don’t think
we want. I’m not sure how else to fix this.
- We could more or less copy the code of `setMetadataFromRC()` into the test
(specifically into `saveChangeInsertProvider()`), since it’s not a hugely
complicated method. But is that a good idea, or does it mean that we’re no
longer testing important code?
- We could move the relevant parts of the test to Repo. But does this make
sense as a Repo test?
TASK DETAIL
https://phabricator.wikimedia.org/T259814
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Tarrow, Ladsgroup, ItamarWMDE, WMDE-leszek, Aklapper,
Lucas_Werkmeister_WMDE, Akuckartz, darthmon_wmde, Nandana, Lahi, Gq86,
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Izno,
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs