DatsunBing
DatsunBing

Reputation: 9076

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?

Upvotes: 0

Views: 1667

Answers (2)

DatsunBing
DatsunBing

Reputation: 9076

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.

Upvotes: 1

Frederic Bazin
Frederic Bazin

Reputation: 1529

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

Upvotes: 0

Related Questions