Run the following commands in terminal:
sudo apt-get remove phpunit
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear update-channels
sudo pear upgrade-all
sudo pear install --alldeps phpunit/PHPUnit
sudo pear install --force --alldeps phpunit/PHPUnit
Test phpUnit installation:
Type the following command in terminal:
phpunit --version
It displays the phpUnit version as follows:
PHPUnit 3.7.19 by Sebastian Bergmann.