Search This Blog

Monday, May 2, 2011

Setting up phpunit in ubuntu



  1. Install PEAR . Issue the command sudo apt-get install php-pear.
  2. Make sure PEAR is up to date. Issue the command sudo pear channel-update pear.php.net
  3. Upgrade the PEAR elements. Issue the command sudo pear upgrade-all.
  4. Tell PEAR where to find the PHPUnit code. Issue the command sudo pear channel-discover pear.phpunit.de
  5. Install PHPUnit. Issue the command sudo pear install -a phpunit/PHPUnit. The -a makes sure all dependency packages are also installed.
  6. Issue the command phpunit --version. You should have version 3.3.17 or newer installed.
  7. Install XDebug. Issue the command sudo apt-get install php5-xdebug. This is needed if you want the HTML based coverage reports. 
  8. Restart the web server after installing this package. (sudo /etc/init.d/apache restart ).
reference 

No comments: