wiki.techinc.nl/tests/phpunit
Antoine Musso 224864ebdd registration: Initialize PSR-4 namespaces at same stage as normal autoloader
readFromQueue() injects the content of AutoloadClasses to
$wgAutoloadClasses however it missed doing the same for
AutoloadNamespaces.

When using the installer with an extension having AutoloadNamespaces
set, its classes would not be found.

Make ExtensionRegistry append to AutoLoader::$psr4Namespaces, and add
a test to cover the new behavior.

Bug: T195783
Change-Id: Id61155867a4ca7d9bc4a347f8671da74b0fa490b
2018-05-30 13:07:42 -07:00
..
data registration: Initialize PSR-4 namespaces at same stage as normal autoloader 2018-05-30 13:07:42 -07:00
docs
includes registration: Initialize PSR-4 namespaces at same stage as normal autoloader 2018-05-30 13:07:42 -07:00
languages Crimean Tatar/crh transliteration odds and ends 2018-05-22 14:59:55 -04:00
maintenance Enable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well 2018-05-24 01:19:01 +02:00
mocks Fix MockMessageLocalizer 2018-03-29 12:32:00 +02:00
skins Convert HTTP links to MediaWiki.org to HTTPS 2018-04-04 18:36:10 +00:00
structure Don't autoload classes in AutoloadStructureTest 2018-05-29 11:09:57 -07:00
suites tests: Remove some unused stuff in phpunit tests 2018-03-26 22:45:29 +00:00
tests Allow schema overrides to drop tables. 2018-03-29 21:44:47 +02:00
autoload.ide.php Setup: Deprecate StartProfiler, move default to DefaultSettings 2018-03-29 21:29:03 +00:00
bootstrap.php
HamcrestPHPUnitIntegration.php Add HamcrestPHPUnitIntegration trait 2018-04-12 19:52:05 -07:00
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php phpunit: Clear job queues in MediaWikiTestCase::setUp() 2018-04-24 00:46:19 +01:00
phpunit.php Allow PHPUnit 6 optionally in require-dev 2018-04-12 20:46:56 -07:00
PHPUnit4And6Compat.php tests: Support passing null to setExpectedException() in compat layer 2018-04-15 08:10:35 +00:00
README
ResourceLoaderTestCase.php resourceloader: Apply safemode to startup module registry 2018-05-19 22:14:33 +02:00
run-tests.bat
suite.xml
TODO

== MediaWiki PHPUnit Tests ==

The unit tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.

DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
TO RETAIN YOUR DATA.


== Installation ==

If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
you explicitly specified the --no-dev flag during the install. In this case just run "composer update".

Otherwise follow the installation instructions in the
PHPUnit Manual at:

  https://phpunit.de/manual/current/en/installation.html


== Running tests ==

The tests are run from your operating system's command line.

Ensure that you are in the tests/phpunit directory of your MediaWiki
installation.


On Unix-like operating systems, the tests runs are controlled with a makefile.
Run command:

  make help

for a full list of options for running tests.


On Windows-family operating systems, run the 'run-tests.bat' batch file.


=== Writing tests ===

A guide to writing PHP unit tests for MediaWiki can be found at:

	https://www.mediawiki.org/wiki/Manual:PHP_unit_testing