I was following this official tutorial on how to run phpunit tests via ssh to another server. Everything went fine, until I actually created test configuration and tried to run the test. The error that I'm getting is this:
ssh://root@172.17.0.1:22/usr/bin/php /root/.phpstorm_helpers/phpunit.php --no-configuration /opt/container/www/app/lib/tests
Testing started at 19.51 ...
bash: line 0: cd: /opt/container/www/app/lib: No such file or directory
Cannot open file "/opt/container/www/app/lib/tests.php".
So I figured that actually the problem is in the path to the test folder. But this is the thing, in this dialog:
directory of the test folder must be located using the local file system, but the actual test folder is on the remote machine and has a different path. As a test, I created '/opt/container/www/app/lib/tests' path on remote server, and voila, phpunit is running successfully. So, the point is that I can't put in the Directory input box the real location of the test folder on remote server, and the tutorial doesn't say nothing about that. Did I miss somethimg, or this is really a bug ?
EDIT: Here is my current configuration:
where directory points to the directory on local file system
Remote interpreter configured:
And
I was able actually to select autload.php from remote server.
For anyone having in PHPStorm error like:
PHP Fatal error: Uncaught PHPUnit_Framework_Exception: Class ... not found...
You have to install phpunit by composer on project level:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.