【发布时间】:2017-10-21 16:35:08
【问题描述】:
我的项目中有一个 vagrant VM(我的项目设置为 vagrant-vm/sites/myproject)
我的测试在myproject/application/tests 中,我在 phpstorm 中设置了以下内容:
- 我的 VM 上有一个远程 PHP 解释器 (5.5.15-1~dotdeb.1),已为我的项目设置为默认值。
- 我将
By Remote InterpreterPHPUnit 配置设置为Path to phpunit.phar,并且它在我的VM 中的路径/home/vagrant/phpunit.phar - 我将 SFTP 部署配置设置为项目的默认配置,并设置了映射。
但是当我运行我的 PHPUnit 运行配置(PHPUnit 不是 PHPUnit on Server)时,我得到以下日志:
vagrant://C:/Users/Hugo/Documents/Projects/vagrant-swappy/usr/bin/php /home/vagrant/.phpstorm_helpers/phpunit.php --no-configuration C:\Users\Hugo\Documents\Projects\vagrant-swappy\sites\swappy\application\tests
Testing started at 11:19 ...
PHPUnit 4.1.4 by Sebastian Bergmann.
bash: line 0: cd: C:/Users/Hugo/Documents/Projects/vagrant-swappy/sites/swappy/application/tests: No such file or directory
Cannot open file "C:UsersHugoDocumentsProjectsvagrant-swappysitesswappyapplicationtests.php".
Process finished with exit code 1
编辑:一些截图:
- PHPUnit 设置:http://i.imgur.com/KAvWYBP.png
- 远程翻译:http://i.imgur.com/0C3w1wC.png
- 部署 SFTP:http://i.imgur.com/QSS2WI7.png
【问题讨论】:
-
请截图
Settings | PHP | PHPUnit。另外:youtrack.jetbrains.com/issue/WI-24093#comment=27-778912 -
已编辑,添加了一些截图。
-
我看到您正在使用 PHAR 选项——在这种情况下很可能是 youtrack.jetbrains.com/issue/WI-24281——已修复;等待下一个 v8 EAP 构建(应该是这周,一两天后)。
-
1) 检查
Default configuration file:并在您的 PHPUnit 设置中使用自定义phpunit.xml。 2) 在您的 PHPUnit 运行配置中检查Defined in the configuration file(PHPUnit不是PHPunit by HTTP)