Autodiscover extension unittests
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 4 Aug 2016 16:44:55 +0000 (09:44 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 4 Aug 2016 16:49:43 +0000 (09:49 -0700)
commit1d7221d066c01c3fa6fb3e539cebd9fe7a91550f
tree70d6730fec17351e68e9736d538479cc126e7e90
parent356b3420d6908f91510aa0cd94f3a363be7f8999
Autodiscover extension unittests

Instead of requiring every extension that wants to add unit tests to
copy the exact same boilerplate over and over, let's just automatically
discover them. We now have an extension registry, so we know exactly
which extensions are loaded (this won't work for extensions not being
loaded through extension.json).

For each extension, we check to see if the directory "tests/phpunit/"
exists, and if it does, add those unit tests. If there is a
`UnitTestsList` subscriber already set, PHPUnit will automatically
de-duplicate test cases so we won't be running anything twice.

Change-Id: I6ec654ef2d8ee3630b121b1277b4ee21ba0b6cd4
tests/phpunit/suites/ExtensionsTestSuite.php