Link only answers are not acceptable on Stackoverflow.
Here are the steps to install on Linux:
wget https://phar.phpunit.de/phpunit-6.1.phar
chmod +x phpunit-6.1.phar
sudo mv phpunit-6.1.phar /usr/local/bin/phpunit
phpunit --version
Verify the version is shown as 6.1.x and then from your Symfony directory you can now run:
phpunit
and your tests should run.
EDIT #2
Based on feedback from Cerad.
Use these commands to install on windows:
- Make a directory C:\bin
- Download https://phar.phpunit.de/phpunit-6.1.phar to C:\bin
- Rename the file phpunit.phar
- Open a command prompt and enter the following:
cd C:\bin
echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
Then you can enter:
phpunit --version
and you should see the version shown. Also you need to add C:\bin to your environment PATH.