wiki.techinc.nl/tests/phpunit
Tim Starling 09cd8eb080 MessageFormatterFactory
An injectable service interface for message formatting, somewhat
narrowed compared to Message.

Only the text format is implemented in this framework so far, with
getTextFormatter() returning a formatter that converts to the text
format. Other formatters could be added to MessageFormatterFactory.

Bug: T226598
Change-Id: Id053074c1dbcb692e8309fdca602f94a385bca0c
2019-08-28 12:28:05 +10:00
..
data MimeAnalyzer: fix ZIP parsing failure 2019-07-25 13:40:18 +10:00
docs Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
documentation tests: Use a fancy generator provider in ReleaseNotesTest 2019-07-02 19:49:43 +01:00
includes MessageFormatterFactory 2019-08-28 12:28:05 +10:00
integration/includes/db Tests: Set dbname for DatabaseSqliteTest 2019-08-20 11:28:29 +02:00
languages Revert "Make LocalisationCache a service" 2019-08-26 18:28:26 +02:00
maintenance Clean up spacing of doc comments 2019-08-05 22:29:50 +00:00
mocks Add ISearchResultSet 2019-07-22 18:27:39 +00:00
skins Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
structure resourceloader: Remove slow structure test for checking getVersionHash 2019-08-01 15:33:23 +00:00
suites More clean up of oracle/mssql 2019-08-14 17:04:50 +02:00
tests Merge "rdbms: clean up $groups logic in LoadBalancer and expand comments" 2019-07-05 22:00:09 +00:00
unit/includes Merge "REST: call MediaWiki::preOutputCommit and doPostOutputShutdown" 2019-08-26 23:36:36 +00:00
bootstrap.maintenance.php Define unit and integration test suites 2019-06-28 12:18:18 -04:00
bootstrap.php Tests: Allow vendor/bin/phpunit from within extension directory 2019-08-14 10:30:25 +02:00
HamcrestPHPUnitIntegration.php Use splat operator in HamcrestPHPUnitIntegration 2019-02-26 18:52:03 -08:00
LessFileCompilationTest.php Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
Makefile
MediaWikiCoversValidator.php phpunit: Avoid get_class() in MediaWikiCoversValidator 2019-07-25 22:40:58 +00:00
MediaWikiGroupValidator.php Move trivially compatible tests to the unit tests suite 2019-06-30 15:23:53 +02:00
MediaWikiIntegrationTestCase.php Revert "Make LocalisationCache a service" 2019-08-26 18:28:26 +02:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php phpunit: Don't include PHPUnitCommand channel in MediaWikiLoggerPHPUnitTestListener 2019-04-07 00:10:16 +01:00
MediaWikiPHPUnitCommand.php Report logs for each individual test failure 2019-03-06 15:13:53 -08:00
MediaWikiPHPUnitResultPrinter.php Report logs for each individual test failure 2019-03-06 15:13:53 -08:00
MediaWikiPHPUnitTestListener.php
MediaWikiTestCaseTrait.php BadFileLookup to replace wfIsBadImage 2019-08-21 20:45:37 +03:00
MediaWikiTestResult.php
MediaWikiTestRunner.php
MediaWikiUnitTestCase.php BadFileLookup to replace wfIsBadImage 2019-08-21 20:45:37 +03:00
phpunit.php
PHPUnit4And6Compat.php Validate the output of the dump scripts. 2019-03-20 22:25:20 +01:00
README Tests: Remove old TODO file and update README with integration notes 2019-07-17 13:00:54 -04:00
ResourceLoaderTestCase.php resourceloader: Remove use of object registering in test suites 2019-07-12 01:17:44 +00:00
run-tests.bat
suite.xml Define unit and integration test suites 2019-06-28 12:18:18 -04:00

== MediaWiki PHPUnit Tests ==

The unit and integration tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the integration 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