Manual:PHP unit testing
Core MediaWiki PHP unit tests are in the tests/phpunit directory. The directory structure roughly matches that of the code being tested. For example: you can find the unit tests for file includes/IP.php in tests/phpunit/includes/IPTest.php.
Extensions often have tests in a tests subdirectory.
Use the navigation table or the links below to browse through this manual, or begin your journey by installing PHPUnit.