wiki.techinc.nl/tests/phpunit
Tim Starling 28750729bd Miscellaneous PHP version related cleanups
MediaWikiTitleCodec: I removed the comment about dbkey being
"conveniently nullified" since that is no longer correct. The first
preg_replace() can return null, and that is guarded. The second
preg_replace() hopefully can't return null, because if it does, trim()
will generate a deprecation notice on PHP 8.1.

Some other self-explanatory changes.

Change-Id: Iad0ace821eba782c3033ec8abfeac461ac4e8ace
2022-11-21 10:11:53 +11:00
..
data Improve LocalisationCache post-merge validation check 2022-11-09 12:57:23 +11:00
docs
includes Miscellaneous PHP version related cleanups 2022-11-21 10:11:53 +11:00
integration/includes Merge "ParsoidHandler: test that selser will re-parse" 2022-11-15 01:24:56 +00:00
languages Split "main variant language code" from "language code with converter" 2022-11-09 03:00:42 +00:00
maintenance
mocks Revert "Reorg: Move some of request related classes to MediaWiki/Request" 2022-10-27 13:14:16 +00:00
structure Include core PSR-4 classes in the generated classmap 2022-11-08 12:13:32 +01:00
suites Followup to 02d13afa: Respect parsoid-compatible options in CLI runs 2022-10-25 17:05:22 -05:00
tests rdbms: improve LoadBalancer connection pool reuse (ii) 2022-10-18 17:23:44 -07:00
unit Miscellaneous PHP version related cleanups 2022-11-21 10:11:53 +11:00
bootstrap.maintenance.php
bootstrap.php profiler: Inject $wgProfiler from Setup.php to Profiler 2022-11-09 02:58:19 +00:00
HamcrestPHPUnitIntegration.php
LessFileCompilationTest.php
MediaWikiCliOptions.php
MediaWikiCoversValidator.php
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php Merge "PHPUnit: introduce clearHooks() method." 2022-11-04 14:11:49 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitExtension.php
MediaWikiPHPUnitResultPrinter.php
MediaWikiTestCaseTrait.php tests: Replace checkPHPExtension() with @requires annotations 2022-10-23 20:47:14 -04:00
MediaWikiUnitTestCase.php
MWTestDox.php
phpunit.php
README.md
ResourceLoaderTestCase.php Reorg: Move some of request related classes to MediaWiki/Request 2022-10-28 10:15:31 +00:00
suite.xml

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