How to install PHPUnit using PEAR

One of the ways to install PHPUnit is through PHP Pear. You must already have PHP Pear installed. This is verified to work on Mac OS X Snow Leopard.

To install PHPUnit through PHP PEAR, the following channels have to be added before an install:

pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear channel-discover components.ez.no
pear install phpunit/PHPUnit

Try running:

phpunit --version

You should see the following response:

PHPUnit 3.5.0 by Sebastian Bergmann.

2 thoughts on “How to install PHPUnit using PEAR

  1. 4F2E4A2E

    i just foung here my magic line:

    pear channel-discover components.ez.no

    no one could tell me that, but you!
    i searched everywhere!
    i tryed everything and every tutorial, but this single line helped me!
    thank you!

    using fresh install copy of snow leopard with all updates (10.6.4)
    thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

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