Extension:Page Forms/Testing
Appearance
This page covers the ways in which the Page Forms code can be tested.
Unit testing with PHPUnit
[edit]To run unit tests for the Page Forms extension, install PHPUnit and run the following command from the MediaWiki root directory:
composer phpunit:entrypoint -- extensions/PageForms/tests
The unit tests for Page Forms only cover the following at present:
- Testing of the {{{section}}} tag processing in the formHTML() method in the pFFormPrinter class.
Page Forms could benefit from additional unit tests to improve test coverage. To get started with writing tests for Page Forms, see Manual:PHP unit testing.