Manual:PHP unit testing
From MediaWiki.org
Contents
- Installing PHPUnit
- Running the unit tests
- Writing testable code
- Writing unit tests in core ...
- .. and for extensions
- Continuous integration
- Fixing broken tests
- Appendix
(how to help, resources ..)
Tools
[edit] Introduction
We do unit testing for MediaWiki's PHP code base using the PHPUnit framework.
MediaWiki unit tests are located in the tests/phpunit directory.
Tests are organized into a directory structure that roughly matches the directory structure of the code that they are testing. For example: you can find the unit tests for file includes/IP.php in tests/phpunit/includes/IPTest.php.
Use the navigation table along this text to browse through this manual or begin your journey by installing PHPUnit.