Install PHPUnit in Ubuntu

in CakePHP, Framework, OS, Ubuntu / 1 Comment

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 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.

Discussion 1 Comment

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>