wiki.techinc.nl/tests/phpunit
2023-03-25 00:35:04 +00:00
..
data Fix some PHPStorm inspections (#1) 2023-03-25 00:19:33 +00:00
docs
includes Merge "Fix some PHPStorm inspections (#1)" 2023-03-25 00:35:04 +00:00
integration/includes tests: Introduce ExtensionJsonTestBase 2023-03-24 16:36:13 +01:00
maintenance tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
mocks Fix some typos 2023-03-21 15:58:09 +01:00
structure tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
suites
tests tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
unit Fix some PHPStorm inspections (#1) 2023-03-25 00:19:33 +00:00
bootstrap.maintenance.php
bootstrap.php phpunit: Check if composer dependencies are up-to-date 2023-03-09 18:26:06 -05:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php profiler: Add ProfilingContext class 2023-03-23 00:08:49 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php phpunit: Add PHPUNIT_LOGS flag 2023-02-08 22:15:32 -08:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiTestCaseTrait.php
MediaWikiUnitTestCase.php
MWTestDox.php
phpunit.php phpunit: Check if composer dependencies are up-to-date 2023-03-09 18:26:06 -05:00
README.md
ResourceLoaderTestCase.php tests: Handle dynamic created properties on test classes 2023-01-13 21:03:42 +00:00
suite.xml phpunit: Lower report limit to 10 slowest tests 2023-03-09 14:08:38 +01:00

MediaWiki PHPUnit tests

WARNING: Integration tests may be destructive and alter or remove parts of your local database. We try to use temporary tables where possible, but you must never run tests on a production server or on a wiki where you don't want to lose data.

Running tests

If you haven't already, run composer update (specifically without --no-dev) in the MediaWiki core directory. This will install PHPUnit.

To read about how to run specific tests, refer to:

https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Running_the_tests

Writing tests

A guide to writing PHPUnit tests for MediaWiki can be found at:

https://www.mediawiki.org/wiki/Manual:PHP_unit_testing