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
Since the match can be case-insensitive (apparently), this meant
ExtensionsTestSuite.php ("extensions") wasn't being validated either.
Bug: T127238
Change-Id: I679de924ebeb45150004783ce404fac92af026a7
The UnitTestsList hook can now be used to add entire directories of
tests, à la phpunit.xml's <directory> tag. The test suite is built by
recursively scanning the directory for any files ending in "Test.php".
TODO:
* Update online hook documentation.
* Generate and autoload a classmap for scanned directories.
Bug: 70630
Change-Id: I3089372f9d7c645e16ff0984a959f982a3bc639f