wiki.techinc.nl/tests/phpunit
Brad Jorsch 3365e83d96 rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization
Aaron is concerned about the extra time added to atomic sections within
an outer transaction if we do a SAVEPOINT and RELEASE. He wants a flag
so callers have to specifically opt-in to use of savepoints.

Change-Id: I64cf5033ced464863d28dd49d9173856a9c1e1c0
2018-03-22 07:20:54 +00:00
..
data Use SPDX 3.0 license identifier 2018-03-18 18:08:22 +00:00
docs
includes rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization 2018-03-22 07:20:54 +00:00
languages Merge "Add Russian grammar forms to support Wikiversity" 2018-03-14 08:37:27 +00:00
maintenance build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
mocks Remove @param comments that literally repeat what the code says 2018-01-10 14:14:26 +01:00
skins Add @covers tags to miscellaneous tests (#2) 2017-12-28 08:52:48 +00:00
structure Accept non-fully qualified TestCase in StructureTest 2018-02-26 18:06:27 +01:00
suites Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01: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 Add actor table and code to start using it 2018-02-23 10:06:20 -08: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