0

I followed the instructions given by CakePHP 2.x (via test.php) to install PHPUnit:

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

That all seemed to finish successfully, but test.php still says PHPUnit is not installed!

It also says to verify that PHPUnit is in the include_path in php.ini. I'm not exactly sure which path should be in the include_path. My current include_path is:

include_path=".;C:\Program Files (x86)\PHP\v5.3\PEAR\pear;C:\Program Files (x86)\PHP\v5.3\pear"

I don't see a PHPUnit folder or anything like that, though there is a PHPUnit-3.5.14.tar file in C:\Program Files (x86)\PHP\v5.3\PEAR\. I'm very new to PEAR, so it could easily be something fundamental going wrong.

I also tried restarting IIS after running the PEAR commands.

Matthew Groves
  • 25,181
  • 9
  • 71
  • 121
  • 1
    `C:\Program Files (x86)\PHP\v5.3\PEAR\pear` looks right for the include to work. You should also find `C:\Program Files (x86)\PHP\v5.3\PEAR\pear\PHPUnit\Autoload.php` if it installed okay. Because PEAR is installed within Program Files check you have administrator privileges when installing. Also there was a [recent change](https://github.com/cakephp/cakephp/commit/3f7cbf561b46aa254fe14fdd1a44440c93daab81) to installation instructions in the docs. – contrebis Jun 14 '12 at 23:43

1 Answers1

1

It was a combination of a couple factors.

My PEAR version was out of date, so I installed the latest one. contrebis's comment was also a factor, the CakePHP docs were updated. Finally, I ran into this problem with installing PHPUnit. After all that, and an update of php.ini's include_path, I got it working.

Community
  • 1
  • 1
Matthew Groves
  • 25,181
  • 9
  • 71
  • 121