wiki.techinc.nl/tests/phpunit
Timo Tijhof a211db0f73 rdbms: Restore test for Database::setFlag()
Follows-up b4eb1feed0, which inadvertendly replaced the setFlag()
test with the clearFlag() test.

Also move the test to the DatabaseTest.php file given it's only
executing and covering base class.

Change-Id: I2f4ed6c4eeba845eb67013e1ab7d2b2bde863119
2018-03-08 04:32:21 +00:00
..
data Adjust tests for JPEG segmentation fix 2018-02-23 12:29:35 +00:00
docs
includes rdbms: Restore test for Database::setFlag() 2018-03-08 04:32:21 +00:00
languages Merge "Fix table loading bug for CRH transliteration" 2018-02-28 21:09:01 +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 Use ::class to resolve class names in tests 2018-01-26 22:49:13 +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 phpunit: Exclude /languages/messages from coverage report 2017-07-27 21:03:18 -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