Search code examples
phpinstallationphpunitpear

PHPUnit installation blues


I have installed PHPUnit by the PHPUnit Manual, Chapter 3. Installing PHPUnit,

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

Now my PHPUnit folder looks like:

> pwd
/usr/share/php/PHPUnit
> ll
drwxr-xr-x  4 root root 4096 2011-05-19 15:12 ./
drwxr-xr-x 19 root root 4096 2011-05-19 15:13 ../
drwxr-xr-x  5 root root 4096 2011-05-19 15:13 Extensions/
drwxr-xr-x  3 root root 4096 2011-05-19 15:12 Framework/

As you can see, no executables. Command phpunit does not exist.

OS: Ubuntu 11.04.

How can it be fixed?


Solution

  • The executable should be /usr/bin/phpunit. Or in pear config-show | grep execu for that matter.

    It case it's not try:

    pear install --force --alldeps phpunit/phpunit 
    

    and check again. It should fix the broken installation.

    Also make sure you are using pear version 1.9.2. If it that might be the problem.

    Run pear install pear/pear to fix that or if that doesn't work out (and installing phpunit still gives you errors):

    pear install --force --alldeps pear/pear