CakePHP Framework OS Ubuntu

Install PHPUnit in Ubuntu

Hi friends, In this post I am going to explain how install PHPUnit in Ubuntu 12.04 , by following commands we can install it. First of 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 Sebastain Bergmann, PHPUnit is one of the xUnit family of frameworks that originated with Kent Beck’s SUnit. PHPUnit is hosted at GitHub. ( Credited by

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

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

Command 7:

sudo pear channel-discover

Command 8:

sudo pear channel-discover

Command 9:

sudo pear install –alldeps phpunit/PHPUnit

Command 10:

phpunit –version

Output : PHPUnit 3.7.10 by Sebastian Bergmann.

1 Comment

  • Reply
    March 18, 2013 at 3:49 pm

    Nice article!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.