Where is PHPUnit?

Solved!

I removed phpunit from the pear and then installed it again. I believe that I used the wrong / old / insufficient sources before installation. It works like a charm!


So, I'm trying to configure PEAR and PHPUnit. I followed http://www.newmediacampaigns.com/page/install-pear-phpunit-xdebug-on-macosx-snow-leopard , but after installing the pear I had a different directory structure in / usr / local. Despite this, I was able to run the phpunit installation. But now I'm lost and ask for help before I make a bigger mess :)

pear config-show says:

PEAR directory php_dir /usr/local/share/pear 

And my php.ini file (and confirmed in phpinfo () says:

 include_path=".:/usr/local/share/pear" 

So good, huh? But what now? I get

Failed to open 'PHPUnit / Framework.php' (include_path = '.: / Usr / local / share / pear')

If I try to include it in php. And I have no idea where the binary can run it from the command line.

Inside /usr/local/share/pear/PHPUnit there are two directories called "Extensions" and "Framework"

+4
source share
2 answers

Sometimes it happens that the installation fails on PHPUnit on purpose, but succeeds in dependencies, so it only looks as if the installation was successful.

Try this on installation

 pear install --force --alldeps phpunit/PHPUnit 

The --force will force --force to install PHPUnit, even if all the dependencies cannot be fulfilled. In my case, there was no dependency for the PHP extension PHP, which blocked the installation, although you could use the PHP_Invoker package PHP_Invoker .

The --alldeps ensures that all dependencies are installed.

+5
source

Check the bin directory in the pear installation, something like the lines /usr/local/share/pear/bin/ - your installation is different from mine.

You can also try to find the binary file -

 find /usr/local/share/pear -name 'phpunit' 
+3
source

All Articles