wiki.techinc.nl/tests/phpunit
2019-07-01 23:25:12 +00:00
..
data Relax HTML sniffing checks on image upload 2019-06-07 14:21:00 -07:00
docs
documentation Revert "Separate MediaWiki unit and integration tests" 2019-06-13 23:00:08 +00:00
includes GlobalFunctions: Tighten version number type for wfDeprecated() 2019-07-01 21:07:10 +00:00
integration/includes/db Define unit and integration test suites 2019-06-28 12:18:18 -04:00
languages Move trivially compatible tests to the unit tests suite 2019-06-30 15:23:53 +02:00
maintenance Add support for xml dump schema 0.11 2019-06-27 21:56:01 +00:00
mocks Add missing newline between <?php and namespace/use section 2019-06-03 13:36:48 +00:00
skins
structure resourceloader: Remove support for raw modules 2019-06-27 00:08:14 +00:00
suites Add missing newline between <?php and namespace/use section 2019-06-03 13:36:48 +00:00
tests Reset services after setting group permissions in tests 2019-06-28 13:28:22 +02:00
unit/includes Move trivially compatible tests to the unit tests suite 2019-06-30 15:23:53 +02:00
bootstrap.maintenance.php Define unit and integration test suites 2019-06-28 12:18:18 -04:00
bootstrap.php Unit tests: Support unit tests in extensions and skins 2019-07-01 16:21:01 -04:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php Move trivially compatible tests to the unit tests suite 2019-06-30 15:23:53 +02:00
MediaWikiIntegrationTestCase.php Drop the check for existences of LocalSettings.php in MediaWikiIntegrationTestCase 2019-07-01 17:15:35 +02:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestResult.php
MediaWikiTestRunner.php
MediaWikiUnitTestCase.php Remove group validator from UnitTestCase 2019-07-01 11:42:21 -04:00
phpunit.php
PHPUnit4And6Compat.php
README
ResourceLoaderTestCase.php resourceloader: Document which FileModule methods use a DB 2019-06-19 23:44:39 +01:00
run-tests.bat
suite.xml Define unit and integration test suites 2019-06-28 12:18:18 -04:00
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