PHPStorm, phpspec directory based testing not working

I've just set up phpspec on a Windows based install of PHPStorm. 

I created a php test target and selected the 'file' option to identify a particular test file to run.   This works fine so long as I explicitly import dependencies into the files under tests, but that is undesirable as I those related files are visible when running the php application and hence an explicit import  causes a duplicate import causing an error. 

However, if I select the 'directory' option I see the test running as in the first case,  but the test does not run successfully as the includes I've used in my test subclass cannot find my php class under test. 

According to the docs,  relative paths should work, below the default working directory set in the test configuration. However neither absolute or relative paths are working, in all cases the file under test cannot be found. 

Does anyone know how to configure php spec so that it a) points at a root directory b) the test classes can see any related files below the root as the docs suggest?

 

I've also tried setting a custom 

1 comment

Sorry for this request to take so long.

I was able to reproduce the issue, running codecept run . in the project directory runs tests, while the Run configuration set to the same directory can't find test suites.

Could you please submit this to our issue tracker?

https://youtrack.jetbrains.com/newIssue?project=WI

0

Please sign in to leave a comment.