现在PEAR方法不再可能,如何为WAMP安装PhpUnit?

All the instructions are about the PEAR method which is now deprecated.

So how do we install it to be able to run phpUnit from command line with WAMP?

https://phpunit.de/manual/current/en/installation.html

install with composer - windows section.

Ok, Peter Popelyshko found the solution. It is documented under the windows section.

I made a bit it simpler:

1) Copied the phpunit.phar file to the php directory eg. c:\wamp\bin\php\php5.4.12\, as the php dir was already in my PATH environment

2) in the same dir run the following command from command line: echo @php "%~dp0phpunit.phar" %* > phpunit.cmd OR manually create a phpunit.cmd file with the following content: @php "%~dp0phpunit.phar %*

3) open a new command line and test with: phpunit --version

Should return PHPUnit x.y.z by Sebastian Bergmann.