Install and install Pearcmd in wamp to enter the PHP directory and execute go-pear installation. if you need to enter Y, press enter for all the remaining parts. Close this console window. double-click the File & ldquo; PEAR_ENV.reg & rdquo; and import the relevant information to the registry. Install PHPUnit and execute the following command in sequence: pearchannel-di
Install in wamp
Install Pear
Run cmd to enter the PHP directory and execute go-pear installation. if you need to input Y, press enter for all the remaining parts.
Close this console window. double-click the File "PEAR_ENV.reg" to import the relevant information to the registry.
Installation is complete.
Install PHPUnit
Execute the following commands in sequence
pear channel-discover pear.phpunit.depear channel-discover components.ez.nopear channel-discover pear.symfony-project.compear update-channelspear upgrade-allpear channel-discover pear.symfony.com
Last run
pear install phpunit/PHPUnit
Or
pear install –alldeps phpunit/PHPUnit
The following error occurs during installation:
No releases available for package "pear.phpunit.de/PHPUnit"
Install failed
This error may be caused by the local cache. the solution is as follows:
Pear clear-cache (clear error record information cache) pear install-a-f phpunit/PHPUnit (reinstall)
If you encounter other errors when executing phpunit unit testing, follow the prompts to install the corresponding components with the following commands:
pear install phpunit/DbUnitpear install phpunit/PHP_Invokerpear install phpunit/PHPUnit_Seleniumpear install phpunit/PHPUnit_Story
For more command references: http://phpunit.de/manual/3.7/en/installation.html