wiki.techinc.nl/tests/phpunit
Aaron Schulz 55d147e4bb objectcache: Split out BagOStuffTestBase class for easier subclassing
Create a simple APCUBagOStuff subclass and also fix
APCUBagOStuff::incrWithInit() default $init value.

Change-Id: If84963fe7dcfedd6edebfb8785235263e0868ece
2020-06-13 20:15:23 +00:00
..
data Remove DatabaseIntegrationTest::testStoredFunctions() 2020-06-02 10:47:29 +10:00
docs
documentation
includes objectcache: Split out BagOStuffTestBase class for easier subclassing 2020-06-13 20:15:23 +00:00
integration/includes UserFactory v.1 - wrapper for User::newFrom* static methods 2020-06-10 20:38:26 -07:00
languages Remove unneeded ::setUp and ::tearDown methods that only call parent 2020-06-07 10:09:32 +00:00
maintenance build: Bump mediawiki-codesniffer to 31.0.0 2020-05-30 14:56:28 +00:00
mocks Fast stale ParserCache responses 2020-06-05 16:24:22 +10:00
skins
structure Merge "Fix SpecialPageFatalTest failing on unrelated deprecations" 2020-06-05 23:10:59 +00:00
suites Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
tests
unit Merge "Add additional RemexDriver paragraph-wrapper test" 2020-06-12 17:19:36 +00:00
bootstrap.maintenance.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiPHPUnitTestListener.php Hooks::run() call site migration 2020-05-30 14:23:28 +00:00
MediaWikiTestCaseTrait.php Replace all call_user_func(_array) in all tests 2020-06-06 18:41:20 +02:00
MediaWikiUnitTestCase.php Merge "Add getMockMessage to MediaWikiTestCaseTrait" 2020-06-03 18:46:43 +00:00
phpunit.php Call ob_start() before running tests 2020-05-25 13:55:28 +10:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php
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