wiki.techinc.nl/tests/phpunit
Ed Sanders 230e90b2af Upstream EasyDeflate library from VisualEditor
The library is used to compress large documents before
sending to the server, as HTTP doesn't support upload compression.
(See T68914 for context.)

N.B. Many of the polyfills in the original are omitted as
MediaWiki doesn't support browsers which require them.

Co-Authored-by: Kunal Mehta <legoktm@member.fsf.org>
Change-Id: I12a5879188f46f17dc4c33bdad52317d218d4172
2018-06-10 14:35:27 +00:00
..
data Merge "resourceloader: Add test case for ResourceLoader::getLessCompiler" 2018-05-20 08:50:48 +00:00
docs
includes Upstream EasyDeflate library from VisualEditor 2018-06-10 14:35:27 +00:00
languages Minor fixes to CRH language conversion. 2018-05-12 14:37:09 -04:00
maintenance Create update SPARQL for category changes 2018-04-20 16:40:35 -07:00
mocks Fix MockMessageLocalizer 2018-03-29 12:32:00 +02:00
skins Convert HTTP links to MediaWiki.org to HTTPS 2018-04-04 18:36:10 +00:00
structure API: Introduce "templated parameters" 2018-05-16 16:19:31 -04:00
suites tests: Remove some unused stuff in phpunit tests 2018-03-26 22:45:29 +00:00
tests Allow schema overrides to drop tables. 2018-03-29 21:44:47 +02:00
autoload.ide.php Setup: Deprecate StartProfiler, move default to DefaultSettings 2018-03-29 21:29:03 +00:00
bootstrap.php
HamcrestPHPUnitIntegration.php Add HamcrestPHPUnitIntegration trait 2018-04-12 19:52:05 -07:00
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 phpunit: Clear job queues in MediaWikiTestCase::setUp() 2018-04-24 00:46:19 +01: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 resourceloader: Apply safemode to startup module registry 2018-05-19 22:14:33 +02: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