wiki.techinc.nl/tests/phpunit
Aaron Schulz d395dfb039 rdbms: make selectRowCount() use $var argument to exclude NULLs
If the $var argument is provided, then it will make the resulting
count exclude rows where the value for that column is NULL.

Also add buildSelectSubquery() method and Subquery
wrapper class for use with select() for calculated tables.

Change-Id: I549d629af99afdf370602de095f7fba6d1546c37
2018-03-18 01:34:33 +00:00
..
data Adjust tests for JPEG segmentation fix 2018-02-23 12:29:35 +00:00
docs
includes rdbms: make selectRowCount() use $var argument to exclude NULLs 2018-03-18 01:34:33 +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 Refactor parser tests 2016-09-12 16:11:42 +10:00
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