wiki.techinc.nl/tests/phpunit
David Causse 3115b3202d Unify SearchEngine normalizeNamespace and parseNamespacePrefixes
These methods are very similar there should be no need to have
two differents way to extract the namespace prefix.

Bug: T198860
Change-Id: I22802278452559d35a3d8f6068549c1fef1a5e86
2018-07-17 21:56:05 +00:00
..
data Use wikimedia/xmp-reader library 2018-05-31 19:24:39 -07:00
docs
documentation tests: Add a doc test for release notes' existence and line length 2018-07-13 17:10:03 -07:00
includes Unify SearchEngine normalizeNamespace and parseNamespacePrefixes 2018-07-17 21:56:05 +00:00
languages Accept BCP 47 codes as aliases for nonstandard variants 2018-07-13 17:43:20 -04:00
maintenance Add maintenance to populate change_tag_def table and ct_tag_id field 2018-06-15 17:57:27 +02:00
mocks Unify SearchEngine normalizeNamespace and parseNamespacePrefixes 2018-07-17 21:56:05 +00:00
skins
structure resourceloader: Embed 'mediawiki' directly in startup response 2018-06-27 17:06:35 +00:00
suites Add @coversNothing to tests that don't cover specific PHP classes 2018-06-12 13:27:40 -07:00
tests Skip MediaWikiTestCaseSchema1Test on Postgres 2018-06-26 15:25:43 +00:00
autoload.ide.php
bootstrap.php
HamcrestPHPUnitIntegration.php Add HamcrestPHPUnitIntegration trait 2018-04-12 19:52:05 -07:00
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
phpunit.php Allow PHPUnit 6 optionally in require-dev 2018-04-12 20:46:56 -07:00
PHPUnit4And6Compat.php tests: Support passing null to setExpectedException() in compat layer 2018-04-15 08:10:35 +00:00
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