How to Install phpunit?

Hi,

i have downloaded the evaluation version of phpstorm. One reason for give it a chance was the nice sounding phpunit integration. But i cant't get it work. I have a windows system with xampp running as development server. I have tried to install phpunit via pear, but there were still not the files for phpuni (Yes i have added the pear directory to the project configuration as descriped in help).

I downloaded phpunit and unzipped the files directly to the pear directory. Now the phpunit sources were found when use "genereate phpunit test". But then it said the phpcoverage is missing. I downloaded it and extracted the file to my pear dirctory. Now it says: "require_once(File/Iterator/Factory.php): failed to open stream".

Ok, i hoped phpunit will run out of the box with PHPStorm. But it seems that i have to install all needed packages manually. Or did i something wrong? Would be thankful for any hint!

Thanks
Chaos

0
6 comments

Your problem is not related with IDE in any way - you should follow instructions on phpunit webside closely if you are not familiar with it.
http://www.phpunit.de/manual/current/en/installation.html

0

hi,

i already tried this way of installation. But you were right, it was not a problem of phpStorm.

I found a solution for install phpunit with xampp for windows.

You have to use

pear install --alldeps phpunit/PHPUnit

instead of

pear install phpunit/PHPUnit

0

mhh, but now phpstorm does not want to have phpunit ;D

Error: (E_USER_NOTICE) Please no longer include "PHPUnit/Framework.php".
PHPUnit is not configured properly

0

Which PhpStorm version do you use? Based on error message it is v1.

Error: (E_USER_NOTICE) Please no longer include "PHPUnit/Framework.php".

This message is generated by PHPUnit v3.5.x.

PhpStorm v1 is working fine with PHPUnit v3.4.x. For current PHPUnit version (3.5.x) you need PhpStorm v2 (currently in beta status -- but you can grab it here -- just note it is still a beta and functionality and bugs are changing from build to build and some builds can be quite unstable).

0

yes, its verion 1.

i will try it with the beta.

thank you

0
Avatar
Sebastian Lauffer

may you have problem with this:

Bug #16939  PEAR Installer should not write to C:\Windows
http://pear.php.net/bugs/bug.php?id=16939

may you update this site please: https://ep.mafiasi.de/p/PHPunit_2_Windows

0

Please sign in to leave a comment.