0

So I've installed PHP Unit via PEAR (all the files are there, I've checked). However, when I try to run a test I get:

Warning: require_once(PHPUnit/Framework.php) [function.require-once]: failed to open stream: No such file or directory in C:\WAMP\www\ExampleTests\arraytest.php on line 2

I'm guessing this has something to do with my PHPUnit installation not updating the include_path properly, but I'm not too sure what to update it to?

I'm on Windows (7), using WAMP.

Cheers!

EDIT: The bottom of PHP.ini contains:

;***** Added by go-pear
include_path=".;C:\WAMP\bin\php\php5.3.10\pear"
;*****

I also get the error:

Fatal error: require_once() [function.require]: Failed opening required 'PHPUnit/Framework.php' (include_path='.;C:\php\pear')

However, after looking in PHP.ini, there's no include path that points to C:\php\pear?

chintanparikh
  • 1,632
  • 6
  • 22
  • 36
  • This has been addressed multiple times, check [this](http://stackoverflow.com/questions/8112866/setup-include-path-for-pear-on-wamp) out. – Jeremy Harris Mar 31 '12 at 03:03
  • @cillosis Tried it, still no luck (edited OP) – chintanparikh Mar 31 '12 at 03:16
  • Are you looking in the correct php.ini? Some installations have one for server requests and one for php-cli. This may be why your include path is inconsistent. – erm410 Mar 31 '12 at 04:20
  • @erm410 I've looked in every php.ini on my computer (the apache one and the php one), and I can't find include_path set to C:\php\pear anywhere :S – chintanparikh Mar 31 '12 at 04:27

1 Answers1

1

PHPUnit 3.6+ does not provide PHPUnit/Framework.php and you don't need to require it in your tests for phpunit to work.

Just removing the require call should do the job.

edorian
  • 38,542
  • 15
  • 125
  • 143