wiki.techinc.nl/tests/phpunit
2022-03-21 20:16:57 +00:00
..
data Bump minimum required version for upgrade to 1.31 2022-03-15 22:12:59 +01:00
docs
includes Merge "Fix uses of (error|warning|success)box in core" 2022-03-21 20:16:57 +00:00
integration/includes Revert "rdbms: make automatic connection recovery apply to more cases" 2022-03-17 20:11:10 +01:00
languages Language: retrieve MainConfig instead of using a bunch of globals 2022-03-15 02:58:42 +00:00
maintenance Benchmark: Force string representation of arguments 2022-03-11 23:14:36 +00:00
mocks Set page id to 0 for pages in virtual namespaces 2022-03-10 20:12:27 +00:00
structure Merge "Generate config name constants." 2022-03-18 11:09:44 +00:00
suites SuiteEventsTrait: don't call setUp() for an empty suite 2022-03-17 14:47:21 +11:00
tests Revert "tests: Add @group Broken to 2022-03-17 23:02:55 +00:00
unit Fix phpunit failures due to invalid testGetResultAllTables provider 2022-03-19 20:58:45 +00:00
bootstrap.maintenance.php
bootstrap.php Define MW_INSTALL_PATH constant and BaseDirectory config. 2022-03-04 14:18:27 +01:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCliOptions.php Improve ObjectCache integration tests 2022-02-11 10:20:33 +11:00
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Merge "Integration test for extension registration" 2022-03-16 17:05:36 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitCommand.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTestCaseTrait.php Add convenience methods for asserting status. 2022-03-16 22:44:25 +01:00
MediaWikiUnitTestCase.php Use updated ObjectFactory namespace 2022-03-09 23:04:51 +00:00
phpunit.php tests: Change use of AtEase to at operator 2022-02-24 21:29:51 +00:00
README
ResourceLoaderTestCase.php Define MW_INSTALL_PATH constant and BaseDirectory config. 2022-03-04 14:18:27 +01:00
run-tests.bat
suite.xml

== 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