MediaWiki REL1_28
README
Go to the documentation of this file.
1== MediaWiki PHPUnit Tests ==
2
3The unit tests for MediaWiki are implemented using the PHPUnit testing
4framework and require PHPUnit to run.
5
6
7=== WARNING ===
8
9Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.
10
11DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
12TO RETAIN YOUR DATA.
13
14
15== Installation ==
16
17If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
18you explicitly specified the --no-dev flag during the install. In this case just run "composer update".
19
20Otherwise follow the installation instructions in the
21PHPUnit Manual at:
22
23 https://phpunit.de/manual/current/en/installation.html
24
25
26== Running tests ==
27
28The tests are run from your operating system's command line.
29
30Ensure that you are in the tests/phpunit directory of your MediaWiki
31installation.
32
33
34On Unix-like operating systems, the tests runs are controlled with a makefile.
35Run command:
36
37 make help
38
39for a full list of options for running tests.
40
41
42On Windows-family operating systems, run the 'run-tests.bat' batch file.
43
44
45=== Writing tests ===
46
47A guide to writing PHP unit tests for MediaWiki can be found at:
48
49 https://www.mediawiki.org/wiki/Manual:PHP_unit_testing
50