registration: Allow overriding attributes in tests
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 12 Jan 2019 19:35:02 +0000 (11:35 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Mon, 14 Jan 2019 20:47:10 +0000 (12:47 -0800)
commit2ff1827b6ea06968a189151092fa9df0435c4cfa
tree7dc893d1cb0844770ab38949f538a1205dbb835f
parent082f16e322919f997ce20b75f5ca15d231c63ee3
registration: Allow overriding attributes in tests

ExtensionRegistry is a rather special singleton that can't use the normal
MediaWikiServices reset due to its early initialization, so introduce
a ->setAttributeForTest method to override attributes that are typically
loaded from extension.json.

Bug: T200013
Change-Id: I9e62a02ed2044c847e9ab2dcdfab094001f88986
includes/registration/ExtensionRegistry.php
tests/phpunit/includes/registration/ExtensionRegistryTest.php