最近将一个 5.3 的项目升级到 5.4,一切看起来都不错。
今天我开始实现 Dusk 但是在运行示例测试时遇到了问题
☁ footy-finance [5.4] ⚡ php artisan dusk
PHPUnit 6.0.0 by Sebastian Bergmann and contributors.
E 1 / 1 (100%)
Time: 162 ms, Memory: 6.00MB
There was 1 error:
1) Tests\Browser\ExampleTest::testBasicExample
ReflectionException: Class config does not exist
/Users/owen/Sites/footy-finance/vendor/laravel/framework/src/Illuminate/Container/Container.php:681
/Users/owen/Sites/footy-finance/vendor/laravel/framework/src/Illuminate/Container/Container.php:565
/Users/owen/Sites/footy-finance/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:105
/Users/owen/Sites/footy-finance/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:263
/Users/owen/Sites/footy-finance/vendor/laravel/dusk/src/TestCase.php:203
/Users/owen/Sites/footy-finance/vendor/laravel/dusk/src/TestCase.php:40
我看过第 40 行TestCase.php
及其
public function baseUrl()
{
return config('app.url');
}
所以它看起来确实与全局config
助手有关,有人有什么想法吗?
我在跑
- PHP 7.0.14
- Laravel/框架 5.4.8
- Laravel/黄昏 1.0.5
完整的 composer.lock 可见https://gist.github.com/OwenMelbz/c05172b33f6eb4483e37a56469b53722
手指交叉你们有一些想法!
干杯:)