install PHPUnit under Mac OS 10.6 Snow Leopord

first, read the following Link:

Then if you get problem with symfony/YAML version conflict  like:

phpunit/PHPUnit requires package „symfony/YAML“ (version >= 1.0.2, version <= 1.0.2), installed version is 1.0.6
No valid packages found
install failed

Just uninstall it with:

sudo pear uninstall symfony/YAML
uninstall ok: channel://

then install old version like this:

sudo pear install symfony/YAML-1.0.2
downloading YAML-1.0.2.tgz …
Starting to download YAML-1.0.2.tgz (9,299 bytes)
…..done: 9,299 bytes
install ok: channel://

Now you can install PHPUnit :

sudo pear install phpunit/PHPUnit
downloading PHPUnit-3.6.12.tgz …
Starting to download PHPUnit-3.6.12.tgz (120,240 bytes)
……………………..done: 120,240 bytes
install ok: channel://


Now to check phpunit

phpunit –version
PHPUnit 3.6.12 by Sebastian Bergmann.