【发布时间】:2021-02-24 07:00:13
【问题描述】:
我已将我的项目从经典安装迁移到 Homestead,如 Laravel-Homepage 中所述。一切正常,除了我的测试用例。
输出如下:
[vagrant:///Users/<username>/Homestead]:/usr/bin/php /home/vagrant/<projectname>/vendor/phpunit/phpunit/phpunit --configuration /home/vagrant/<projectname>/phpunit.xml --filter Tests\\Feature\\LoggingTest --test-suffix LoggingTest.php /Users/<username>/projects/<projectname>/tests/Feature --teamcity
Cannot open file "/Users/<username>/projects/<projectname>/tests/Feature.php".
所以我的问题是,我在 PhpStorm 中从哪里更改最后一条路径
/Users/<username>/projects/<projectname>/tests/Feature
到
/home/vagrant/<projectname>/tests/Feature
或者甚至更好地完全删除它,因为那个文件根本不存在?
在迁移之前测试运行良好,所以我错过了什么?
这是我的 Homestead.yaml:
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: parallels
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/projects/<projectname>
to: /home/vagrant/<projectname>
type: "nfs"
- map: ~/projects/php
to: /home/vagrant/php
type: "nfs"
sites:
- map: homestead.local
to: /home/vagrant/<projectname>/public
type: "laravel"
databases:
- <correct_database_name>
features:
- mysql: true
- mariadb: false
- ohmyzsh: true
- webdriver: false
【问题讨论】:
标签: php laravel phpunit vagrant phpstorm