Installing PHPUnit on ubuntu

The installation package that can be installed from apt includes a console tool to run PHPUnits, but is (currently) not the latest version. One way to get past this is to install PHPUnit from apt and then upgrade PHPUnit via PEAR note: (currently) PEAR needs to be updated as well.

user@devserver~: sudo apt-get install phpunit
user@devserver~: sudo pear channel-discover pear.phpunit.de
user@devserver~: sudo pear channel-discover components.ez.no
user@devserver~: sudo pear channel-discover pear.symfony-project.com
user@devserver~: sudo pear update
user@devserver~: sudo pear update phpunit/PHPUnit

The line that simply says “sudo pear update” should use updates per to the latest version. Also as the commenter says “upgrade” might be the right keyword to us for some versions.