Description

XOOPS Visual PHPUnit is a developer tool to make unit testing easier.

XOOPS includes a suite of unit tests, using PHPUnit, that cover the core distribution. As the core changes, unit tests need to be run to make sure the changes did not break expected functionality. Also, new methods and classes require new tests be developed. While unit testing will be automatically run when changes are submitted for inclusion, it is much better to test while making the changes.

The command line nature of PHPUnit is great for automation. The entire test suite can be run in a single command. When you just want to run tests on a single, or small set of classes, it might not seem so great. Sifting through the shell output to find what you need can be tedious. With Xvpu, you can run the tests from your web browser, and navigate the results inside a GUI environment.

Installation

XOOPS Visual PHPUnit is a deployed as a Composer managed XOOPS module. To manually install it, issue this command from inside the xoops_lib directory:

composer require "geekwright/xvpu"

Then install the Xvpu module from the system administration area. All additional requirements are handled as composer dependencies.

Configuration

In module preferences, specify the path to the unit test directory, and the path to the bootstrap script to be run before tests are run. The test directory will default to a location consistent with working inside a XOOPS/XoopsCore fork, and will guess at the location of the tests directory. Likewise, the bootstrap file will default to the main XOOPS autoloader, xoops_lib/vendor/autoload.php If these defaults are not correct, specify your desired defaults.

If your system is used by others that you do not want to be able to use Xvpu, be sure to check the module permissions granted to each group. Use of Xvpu in a production environment is NOT recommended.

Credits

NIH! (Not Invented Here!)

This work is based on the 1.5.6 release of VisualPHPUnit. For details, see:
https://github.com/NSinopoli/VisualPHPUnit/tree/v1.5.6

Last, but far from least, the powerplant that makes it all possible is PHPUnit:
https://phpunit.de/