wiki.techinc.nl/tests/phpunit
Aryeh Gregor be391449ae Improve test coverage for ApiMain.php
One bug fixed: if ApiCheckCanExecute returned false but didn't set
$message, we would try to output a message of false, which would throw
an exception.

Change-Id: Ib06970e280d750ff57d81672f1b365167b93aa3e
2018-04-08 21:15:37 +03:00
..
data Use SPDX 3.0 license identifier 2018-03-18 18:08:22 +00:00
docs
includes Improve test coverage for ApiMain.php 2018-04-08 21:15:37 +03:00
languages Merge "Add Russian grammar forms to support Wikiversity" 2018-03-14 08:37:27 +00:00
maintenance tests: Remove some unused stuff in phpunit tests 2018-03-26 22:45:29 +00:00
mocks Merge "Add MockMessageLocalizer" 2018-03-28 17:25:54 +00:00
skins
structure Accept non-fully qualified TestCase in StructureTest 2018-02-26 18:06:27 +01:00
suites tests: Remove some unused stuff in phpunit tests 2018-03-26 22:45:29 +00:00
tests tests: fix Specified key was too long; in a schema 2018-03-15 22:28:41 +01:00
autoload.ide.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
bootstrap.php
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php Verify that all @covers tags are sane when running tests 2017-12-29 20:19:12 +00:00
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
MediaWikiTestCase.php Improve test coverage for ApiMain.php 2018-04-08 21:15:37 +03:00
phpunit.php build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
README
ResourceLoaderTestCase.php resourceloader: Removed tests for deprecated 'position' parameter 2018-02-12 21:39:05 +00:00
run-tests.bat
suite.xml
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