我的项目中有一个流浪汉VM(我的项目已设置好vagrant-vm/sites/myproject)
我的测试在myproject/application/tests,我在phpstorm中设置了以下内容:
By Remote InterpreterPHPUnit配置设置为Path to phpunit.phar我的VM中的路径/home/vagrant/phpunit.phar但是当我运行我的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
Run Code Online (Sandbox Code Playgroud)
编辑:一些截图:
我一直在玩所有的PhpStorm格式化选项,但如果按照我想要的方式行事,就无法找到方法.
所以基本上我想要PhpStorm:
转过来:
myfunction('hello',
'world');
Run Code Online (Sandbox Code Playgroud)
进入:
myfunction(
'hello',
'world'
);
Run Code Online (Sandbox Code Playgroud)
2.保持原样:
myfunction([
'hello' => 'world',
]);
Run Code Online (Sandbox Code Playgroud)
这也不应该重新格式化:
myfunction($variableOne, [
'hello' => 'world',
]);
Run Code Online (Sandbox Code Playgroud)
这可能吗?