Home > Framework > CakePHP > Install PHPUnit in Ubuntu

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

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.

You may also like
Install Xdebug In Ubuntu
Install Xdebug In Ubuntu
Installation and usage procedure of MySql Workbench in Ubuntu 12.04
Installation and usage procedure of MySql Workbench in Ubuntu 12.04
Install SVN client in UBUNTU 12.04
How to install google chrome browser in ubuntu

1 Response

Leave a Reply

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