Installing PHPUnit

WHAT’S IN MY MACHINE

  • CentOS Linux
  • PHP 5.4.4
  • Yii 1.1.12

HOW TO MAKE PHPUNIT WORK

1. You have to have PEAR installed and the version must be 1.9.2 or higher:

pear upgrade pear

2. Register PHPUnit with the local PEAR environment (pear.phpunit.de)

pear channel-discover pear.phpunit.de

3. Install the PHPUnit and its dependencies

pear install –alldeps phpunit/PHPUnit

4. You’re done. To test it in your command line, just type:

phpunit

You should get something like:

PHPUnit ver. # by Sebastian Bergmann

: )

Happy testing!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s