Page MenuHomePhabricator

Multiple Wikibase service wiring tests fail when run as unit tests
Open, LowPublic

Description

The service wiring tests we’re adding are supposed to be unit tests that can run without MediaWiki being installed, but some of them fail when run directly via vendor/bin/phpunit (rather than tests/phpunit/phpunit.php).

AC: The following commands, run in the MediaWiki directory, should succeed:

vendor/bin/phpunit extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiring/
vendor/bin/phpunit extensions/Wikibase/client/tests/phpunit/unit/includes/ServiceWiring/

Checklist as of 2021-05-04:

Related Objects

Event Timeline

Change 672744 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: mock LanguageFallbackChainFactory in ValueFormatterFactoryTest

https://gerrit.wikimedia.org/r/672744

Change 672745 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Fix LanguageFallbackChainFactory constructor

https://gerrit.wikimedia.org/r/672745

Change 672746 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: inject TitleFactory into EntitySourceDocumentUrlProvider

https://gerrit.wikimedia.org/r/672746

Change 672747 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: inject LanguageNameUtils into MediaWikiContentLanguages

https://gerrit.wikimedia.org/r/672747

Change 672748 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Inject LanguageNameUtils into MediaWikiContentLanguages

https://gerrit.wikimedia.org/r/672748

Change 672745 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix LanguageFallbackChainFactory constructor

https://gerrit.wikimedia.org/r/672745

Change 672746 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: inject TitleFactory into EntitySourceDocumentUrlProvider

https://gerrit.wikimedia.org/r/672746

Change 672744 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: mock LanguageFallbackChainFactory in ValueFormatterFactoryTest

https://gerrit.wikimedia.org/r/672744

Change 672747 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: inject LanguageNameUtils into MediaWikiContentLanguages

https://gerrit.wikimedia.org/r/672747

Change 672748 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Inject LanguageNameUtils into MediaWikiContentLanguages

https://gerrit.wikimedia.org/r/672748

All the tests that are fixable for now have been fixed; I’ve created Phabricator tasks for the MediaWiki services we need in order to fix the rest, and suggest we move this back to our backlog for the time being. If we have some time at the end of our project, we might be able to fix the remaining tests (the MediaWiki core changes should hopefully not be too difficult).

Change 675840 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Make WikiPageEntityMetaDataLookup default to NullLogger

https://gerrit.wikimedia.org/r/675840

Addshore removed a project: Wikidata-Campsite.
Addshore added a subscriber: Addshore.

Prioritized very low, so removing from Wikidata-Campsite