wiki.techinc.nl/tests/phpunit
2019-10-30 12:14:25 +00:00
..
data tests: Nuke everything HHVM-related 2019-10-05 12:51:07 -07:00
docs
documentation
includes Merge "Unit tests for FileBackend" 2019-10-30 11:28:44 +00:00
integration/includes Merge "Revert "rdbms: optimize insert(), replace(), and upsert() for sqlite when possible"" 2019-10-08 17:06:53 +00:00
languages Drop MediaWikiServices::resetLanguageServices() 2019-10-29 15:28:18 +02:00
maintenance WikiExporter: Remove unnecessary check for SCHEMA_COMPAT_WRITE_OLD flag 2019-10-28 20:46:30 +00:00
mocks Add public as visibility in tests folder 2019-10-10 21:55:37 +02:00
skins Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
structure Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
suites Convert FileBackendGroup to service 2019-10-25 10:46:20 +03:00
tests Move MediaWikiTestCase::setUp() and tearDown() to annotation hooks 2019-10-17 20:22:39 -07:00
unit Merge "Hard-deprecate LockManagerGroup::getDefault/getAny" 2019-10-30 12:02:39 +00:00
bootstrap.maintenance.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Merge "Drop MediaWikiServices::resetLanguageServices()" 2019-10-30 12:14:25 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiPHPUnitCommand.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiPHPUnitResultPrinter.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiPHPUnitTestListener.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiTestCaseTrait.php Hard-deprecate LockManagerGroup::getDefault/getAny 2019-10-29 14:48:44 +02:00
MediaWikiTestResult.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiTestRunner.php Update tests to use PHPUnit 6 class names 2019-10-06 01:01:28 -07:00
MediaWikiUnitTestCase.php Convert FileBackendGroup to service 2019-10-25 10:46:20 +03:00
phpunit.php tests: Nuke everything HHVM-related 2019-10-05 12:51:07 -07:00
PHPUnit4And6Compat.php PHPUnit4And6Compat tweaks 2019-10-04 19:28:38 -07:00
README
ResourceLoaderTestCase.php
run-tests.bat
suite.xml

== MediaWiki PHPUnit Tests ==

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


=== WARNING ===

Some of the integration 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