Page MenuHomePhabricator

Support running unit tests and extending MediaWikiUnitTestCase in skins and extensions
Closed, ResolvedPublic

Description

Plan is to:

  • Modify phpunit.xml.dist to support finding tests in extensions/**/tests/phpunit/unit
  • Add some code that runs before the testsuite to iterate over all extensions and skins, and call ExtensionRegistry::getInstance()->queue( $path ) followed by ExtensionRegistry::getInstance()->loadFromQueue()

Details

Related Gerrit Patches:

Event Timeline

kostajh created this task.Jun 30 2019, 12:58 AM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptJun 30 2019, 12:58 AM
Ladsgroup awarded a token.

once this is done, I will apply it to wikibase.

Cool! I’ll try to post something later today.

Change 519796 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] (wip) Unit tests: Support unit tests in extensions and skins

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

Change 519796 merged by jenkins-bot:
[mediawiki/core@master] Unit tests: Support unit tests in extensions and skins

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

Change 520193 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Move trivial unit tests to the new structure

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

Change 520212 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/MobileFrontend@master] Migrate unit tests to the new structure

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

Change 520212 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Migrate unit tests to the new structure

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

kostajh closed this task as Resolved.Jul 16 2019, 9:37 PM

Done via the patches above.

Change 530809 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] Unit tests: Remove duplicated code in ExtensionRegistry

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

Change 531352 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/core@master] ExtensionRegistry: Remove exportAutoloadClassesAndNamespaces

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

Change 530809 merged by jenkins-bot:
[mediawiki/core@master] Unit tests: Remove duplicated code in ExtensionRegistry

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