(bug 41833) Test: Add AutoLoaderTest.
* Move scattered pieces from tests/* in main AutoLoader.php
into tests/TestsAutoLoader.php.
Verified with:
'ack -Q i --ignore-dir tests/phpunit/ <classname>'
on mediawiki/core that these classes are not used outside
tests/phpunit/.
* Moved entry for maintenance/backup.inc to the main AutoLoader.
* Refactored assertion logic in maintenance/checkAutoLoader.php
into a public static method used in it's execute method
and in the (new) AutoLoaderTest suite.
* The new test was immediately failing, added missing classes
and removed old ones that don't exist.
And CheckAutoLoader itself, so that it can actually be used
in AutoLoaderTest.php
* Per discussion on Gerrit, moved the logic into the unit test
instead of refactoring the maintenance script, we no longer
need the maintenance script.
* Fixed the regex to also detect abstract, final and interface.
The test was failing badly, claiming many classes did not
exist.
* Improved the logic to also catch entries in the AutoLoader
configuration for inexisting classes in existing files.
So far it only catched entries with wrong files and missing
entries for classes in known files.
An entry like "BlablaSomethingHere => includes/Action.php"
did not emit any kind of warning. The refactored logic
builds a reverse index and uses a simple assertEquals to
find any inconsistencies (whatever the cause).
Change-Id: I0a307f23175d52345180cdfc7c2d5e172536be1b