开发者

How to run PHPUnit Test from another directory

I have a very straightforward PHPUnit test in c:\kim\test\HelloTest.php on a Windows PC. I can execute it from within the c:\kim\test directory with the command:

phpunit HelloTest

The problem is that I can't execute it from any other directory.

As far as I know I should be able to execute this from开发者_开发百科 the c:\kim directory with:

phpunit test

Also, I would have thought the following syntax would work too:

phpunit c:\kim\test

But I don't get any response from the command. Simply a blank line and then I am returned to the cursor.

I am trying to get unit tests working properly with Netbeans and I think I need to solve this problem first. Perhaps it has something to do with paths? Any ideas?


I spent quite a while trying to sort this out, per the comments above. Also tried reinstalling PHPUnit. In the end I ran up a new server, installed XAMPP, and all works fine.


If any help. I am using makegood extension for eclipse which handle phpunit test execution with one click. Maybe you can find similar extension for Netbeans or switch to eclipse

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜