wiki.techinc.nl/tests/phpunit
DannyS712 7c6fbecf34 Convert MWLBFactoryTest to pure unit tests
No integration needed, remove `@group Database` tag

Change-Id: I2743ac252445cc4f5e2fe58939e81270a6a6525a
2021-04-14 16:48:30 +00:00
..
data DoctrineSchemaBuilder: Do not add prefix placeholder for Postgres at all 2021-04-06 00:23:14 +00:00
docs
includes Convert MWLBFactoryTest to pure unit tests 2021-04-14 16:48:30 +00:00
integration/includes Merge "Remove $actor field from UsererIdentityValue" 2021-04-14 14:40:12 +00:00
languages Remove some deprecated methods from the Language class 2021-04-13 13:26:27 +00:00
maintenance Move MWDoxygenFilterTest to unit tests 2021-03-28 18:33:51 +00:00
mocks Merge "Remove $actor field from UsererIdentityValue" 2021-04-14 14:40:12 +00:00
structure Remove $actor field from UsererIdentityValue 2021-04-13 18:18:06 +00:00
suites Fix typo in ParserTestTopLevelSuite 2021-02-19 15:51:50 +01:00
tests
unit Convert MWLBFactoryTest to pure unit tests 2021-04-14 16:48:30 +00:00
bootstrap.maintenance.php
bootstrap.php
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
Makefile
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiHooksPHPUnitExtension.php phpunit: Remove MediaWikiPHPUnitTestListener 2021-03-20 15:55:26 +01:00
MediaWikiIntegrationTestCase.php Convert DiffHistoryBlobTest to pure unit test 2021-04-14 02:09:51 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitCommand.php phpunit: Remove MediaWikiPHPUnitTestListener 2021-03-20 15:55:26 +01:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiTestCaseTrait.php Convert DiffHistoryBlobTest to pure unit test 2021-04-14 02:09:51 +00:00
MediaWikiUnitTestCase.php tests: Avoid problematic language in comments and internal code 2021-03-28 21:21:28 -07:00
phpunit.php Use ::class for class name 2021-04-08 21:17:42 +02:00
README
ResourceLoaderTestCase.php resourceloader: Allow modules to mark themselves as ES6-only 2021-03-04 14:53:36 -05:00
run-tests.bat
suite.xml phpunit: Remove MediaWikiPHPUnitTestListener 2021-03-20 15:55:26 +01: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