Hi friends, In this post, I am going to explain how to install PHPUnit in Ubuntu 12.04, by following commands we can install it. First, we have to that what is PHPUnit and why we need to use it in PHP language?

PHPUnit is a unit testing software framework for the PHP programming language. Created by Sebastian Bergmann, PHPUnit is one of the xUnit family of frameworks that originated with Kent Beck’s SUnit. PHPUnit is hosted at GitHub. ( Credited by http://en.wikipedia.org/)

Install PHPUnit in Ubuntu by Anil Labs

There is list command to PHPUnit in Ubuntu

Command 1 :

sudo apt-get install php-pear

Command 2 :

sudo pear channel-update pear.php.net

Command 3 :

sudo pear upgrade-all

Command 4 :

sudo apt-get install phpunit

If you face any errors then install all dependencies

Command 5:

sudo pear upgrade pear

Command 6:

sudo pear channel-discover pear.phpunit.de

Command 7:

sudo pear channel-discover components.ez.no

Command 8:

sudo pear channel-discover pear.symfony.com

Command 9:

sudo pear install –alldeps phpunit/PHPUnit

Command 10:

phpunit –version

Output : PHPUnit 3.7.10 by Sebastian Bergmann.


1 Comment

bibin · March 18, 2013 at 3:49 pm

Nice article!!

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *