4
当我在Laravel Lumen中创建PHPUnit测试用例并调用visit('/')
函数时,PHPUnit始终返回404错误代码。PHPUnit/Lumen始终返回404
我有以下代码来测试怪异的行为:
class TestCase extends Laravel\Lumen\Testing\TestCase {
protected $baseUrl = 'https://google.com'; // this used to be my own url but even this doesn't work.
public function createApplication() {
return require __DIR__.'/../bootstrap/app.php';
}
}
class CountryTest extends TestCase {
public function testIndex() {
$this->visit('/');
}
}
有谁知道我做错了什么或如何解决这一问题?
在此先感谢。