lumen框架做PHPUNIT测试时遇到ReflectionException: Class config does not exist

https://github.com/laravel/framework/issues/8547
解决方法:每个test实例都重新创建应用

public function setUp()
{
parent::setUp();

$this->createApplication();

}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.