wiki.techinc.nl/tests/phpunit
Umherirrender 73bf53e94f Remove @uses annotation from XhprofDataTest
The use of a class is visible by the code or @covers

Change-Id: I1acec60da4b524c171686402a01424d66e9fc99f
2018-08-07 12:07:00 +02:00
..
data registration: Validate no duplicate keys exist in extension.json 2018-07-18 09:29:43 +00:00
docs
documentation tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07:00
includes Remove @uses annotation from XhprofDataTest 2018-08-07 12:07:00 +02:00
languages Automatically reset namespace caches when needed 2018-08-01 16:30:08 +03:00
maintenance Disable PHPUnit tests that fail under postgres 2018-08-01 22:22:15 +00:00
mocks Unify SearchEngine normalizeNamespace and parseNamespacePrefixes 2018-07-17 21:56:05 +00:00
skins
structure Introduce SpecialPageFatalTest 2018-07-31 07:11:48 +00:00
suites Fix test database prefix in ParserTestTopLevelSuite 2018-07-16 16:21:51 +02:00
tests Introduce MediaWikiTestCase::markTestSkippedIfDbType() 2018-08-01 00:19:10 -07:00
autoload.ide.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Merge "Introduce ContentLanguage service to replace $wgContLang" 2018-08-02 02:52:23 +00:00
phpunit.php Make maintenance scripts fail on unknown parameters 2018-08-06 14:37:49 -05:00
PHPUnit4And6Compat.php
README
ResourceLoaderTestCase.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
run-tests.bat
suite.xml tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07: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