wiki.techinc.nl/tests/phpunit
Brad Jorsch 6ff65e57bb API: Remove long-deprecated methods (and one class)
* ApiBase::profileIn() (deprecated in 1.25)
* ApiBase::profileOut() (deprecated in 1.25)
* ApiBase::safeProfileOut() (deprecated in 1.25)
* ApiBase::profileDBIn() (deprecated in 1.25)
* ApiBase::profileDBOut() (deprecated in 1.25)
* ApiBase::dieUsage() (deprecated in 1.29)
* ApiBase::dieUsageMsg() (deprecated in 1.29)
* ApiBase::dieUsageMsgOrDebug() (deprecated in 1.29)
* ApiBase::getErrorFromStatus() (deprecated in 1.29)
* ApiBase::parseMsg() (deprecated in 1.29)
* ApiBase::setWarning() (deprecated in 1.29)
* ApiPageSet::getInvalidTitles() (deprecated in 1.26)
* ApiQueryLogEvents::addLogParams() (deprecated in 1.25)
* ApiUsageException::getCodeString() (deprecated in 1.29)
* ApiUsageException::getMessageArray() (deprecated in 1.29)
* UsageException (deprecated in 1.29)

Change-Id: Iabb2589a29cc3b46624d31358f3a6bf7b3ccbd57
2018-10-15 16:37:04 -04:00
..
data Merge "TemplateParser: Pass FLAG_MUSTACHELOOKUP to enable parent context access" 2018-09-05 00:33:42 +00:00
docs
documentation RELEASE-NOTES: Use New/Changed/Removed pattern for Configuration section 2018-09-01 19:59:30 +00:00
includes API: Remove long-deprecated methods (and one class) 2018-10-15 16:37:04 -04:00
languages Merge "Accept BCP 47 codes as aliases for nonstandard variants" 2018-10-11 20:46:42 +00:00
maintenance Schema change for reading ct_tag_id instead of ct_tag 2018-09-04 19:29:48 +02:00
mocks Avoid constructing Title objects in data providers 2018-09-03 16:36:49 +00:00
skins Convert HTTP links to MediaWiki.org to HTTPS 2018-04-04 18:36:10 +00:00
structure AutoloadGenerator: Filter PSR4-compliant classes instead of ignoring directories 2018-09-20 15:15:27 -04:00
suites Merge "Only use "*Test.php" for actual PHPUnit tests" 2018-10-04 15:43:12 +00:00
tests Deprecate MediaWikiTestCase::stashMwGlobals 2018-10-07 19:39:47 +03:00
bootstrap.php
HamcrestPHPUnitIntegration.php Add HamcrestPHPUnitIntegration trait 2018-04-12 19:52:05 -07:00
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 Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
MediaWikiPHPUnitCommand.php Output only to stderr in unit tests 2018-10-08 21:04:12 +03:00
MediaWikiPHPUnitTestListener.php Add hooks to MediaWikiPHPUnitTestListener start/endTest 2018-09-10 10:44:24 +00:00
MediaWikiTestCase.php tests: Add helper function for ini_set with automatic cleanup 2018-10-10 22:31:37 -07:00
MediaWikiTestResult.php Make phpunit.php less hackish, and install the listener unconditionally 2018-09-04 15:30:20 +10:00
MediaWikiTestRunner.php Make phpunit.php less hackish, and install the listener unconditionally 2018-09-04 15:30:20 +10:00
phpunit.php Output only to stderr in unit tests 2018-10-08 21:04:12 +03:00
PHPUnit4And6Compat.php tests: Support passing null to setExpectedException() in compat layer 2018-04-15 08:10:35 +00:00
README
ResourceLoaderTestCase.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
run-tests.bat
suite.xml Merge "Only use "*Test.php" for actual PHPUnit tests" 2018-10-04 15:43:12 +00: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