PHPUnit Command Line Include Path

Posted by thatidiotguy on Stack Overflow See other posts from Stack Overflow or by thatidiotguy
Published on 2013-10-25T15:49:10Z Indexed on 2013/10/26 21:55 UTC
Read the original article Hit count: 241

Filed under:
|

So I have a project structure like so:

MyProject/
  src/
    //subfolders and source code
   .....
  tests/
    package/
      MyTest.php

I am trying to run the unit tests in MyTest.php with PHPUnit but it has a use statement for PHP classes located in the src folder. So I tried to use the include-path directive for PHPUnit like so:

(I am in the directory with MyTest.php)

phpunit --include-path ~/workspace/MyProject/src/ MyTest

Unfortunately execution is halting at the first use statement. What gives?

© Stack Overflow or respective owner

Related posts about php

Related posts about phpunit