wiki.techinc.nl/tests/phpunit
Aaron Schulz cb15755e92 Normalize use of "INNER JOIN" to "JOIN" in database queries
The ANSI SQL default join type is INNER and this might save
some line breaks here and there.

Change-Id: Ibd39976f46ca3f9b71190d3b60b76ca085787a00
2019-03-06 09:17:30 -08:00
..
data Merge "registration: Allow @-prefixed keys in manifest_version 2" 2019-02-14 06:38:04 +00:00
docs Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
documentation INSTALL, UPGRADE: Re-wrap to 80 chars and enforce 2018-10-16 19:45:25 -07:00
includes Normalize use of "INNER JOIN" to "JOIN" in database queries 2019-03-06 09:17:30 -08:00
languages Fix comments in language class tests 2018-12-25 15:00:34 +01:00
maintenance Remove comments literally documenting unit tests being unit tests 2019-02-19 15:18:12 +01:00
mocks media: Mark public MediaHandler/ImageHandler methods as such 2019-02-25 10:16:30 +01:00
skins Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
structure Merge "Show password policy flags on Special:PasswordPolicies" 2019-03-02 03:51:05 +00:00
suites resourceloader: Instantiate main class via ServiceWiring 2019-02-18 17:55:09 +00:00
tests Deprecate MediaWikiTestCase::stashMwGlobals 2018-10-07 19:39:47 +03:00
bootstrap.php
HamcrestPHPUnitIntegration.php Use splat operator in HamcrestPHPUnitIntegration 2019-02-26 18:52:03 -08:00
LessFileCompilationTest.php Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
Makefile docs: Remove 'code-coverage' placeholder directory 2019-01-25 18:35:46 -08:00
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
MediaWikiLoggerPHPUnitTestListener.php Fix lowercase in namespace of LogCapturingSpi.php 2019-02-26 13:17:09 +01:00
MediaWikiPHPUnitCommand.php Print logs generated during unit test when test fails 2019-02-06 14:43:32 -08:00
MediaWikiPHPUnitResultPrinter.php Print logs generated during unit test when test fails 2019-02-06 14:43:32 -08:00
MediaWikiPHPUnitTestListener.php Add hooks to MediaWikiPHPUnitTestListener start/endTest 2018-09-10 10:44:24 +00:00
MediaWikiTestCase.php Print logs generated during unit test when test fails 2019-02-06 14:43:32 -08:00
MediaWikiTestResult.php Make phpunit.php less hackish, and install the listener unconditionally 2018-09-04 15:30:20 +10:00
MediaWikiTestRunner.php Make phpunit.php less hackish, and install the listener unconditionally 2018-09-04 15:30:20 +10:00
phpunit.php Output only to stderr in unit tests 2018-10-08 21:04:12 +03:00
PHPUnit4And6Compat.php Added future compat expectException to PHPUnit4And6Compat trait 2019-02-04 15:07:45 +00:00
README
ResourceLoaderTestCase.php
run-tests.bat
suite.xml Merge "Only use "*Test.php" for actual PHPUnit tests" 2018-10-04 15:43:12 +00: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