Showing posts with label xdebug. Show all posts
Showing posts with label xdebug. Show all posts

Wednesday, September 3, 2014

PHPUnit Pear Install In Ubuntu

Hi,

To install the PHPUnit in ubuntu, Please follow the below instruction:

If your system does not have Pear installed then:

# sudo apt-get install php-pear

# sudo pear channel-update pear.php.net

Now, You have to install the PHPUnit, with the help of pear easily:


# sudo pear channel-discover pear.phpunit.de

# sudo pear install -a phpunit/PHPUnit

If you want the code-coverage analysis of your application then you have to install the PHP extension i.e. Xdebug , That will help you create the html formatted report where you can see:
i) Code coverage percentage
ii) Which test case run on your application code

Command, to install Xdebug:
# sudo apt-get install php5-xdebug

NOTE: The above process of installation via PEAR would be outdated on Dec, 2014.
Please try to use Composer instead of PEAR