我试图在Laravel 5中使用Codeception稍微玩一下,我得到一个NotFoundHttpException。
谁能告诉我我做错了什么?
已安装(通过作曲家)
"codeception/codeception": "*"
选择vendor/bin/codecept bootstrap
已编辑tests/functional.suite.yml
class_name: FunctionalTester
modules:
enabled: [Filesystem, FunctionalHelper, Laravel5]
有vendor/bin/codecept build
在tests\functional\RegisterCept.php
$I = new FunctionalTester($scenario);
$I->wantTo('register a user');
$I->amOnPage('/');
$I->see('online');
修改vendor/codeception/codeception/src/Codeception/Lib/Connector/Laravel5.php
的终止方法(由于错误修复研究)
public function terminate(DomRequest $request, Response $response)
{
$request = Request::createFromBase($request);
$request->enableHttpMethodParameterOverride();
$this->httpKernel->terminate($request, $response);
}
Ran ./vendor/bin/codecept在集合中运行功能和测试失败我看到"在线"
在tests \ _output \中,我在RouteCollection.php第145行中看到带有NotFoundHttpException的RegisterCept.fail.html:
有谁知道如何解决这个问题?
答案 0 :(得分:0)
我还没有尝试过使用Codeception包的Laravel 5连接器,但GitHub上有一个用于Laravel 5的Codeception模块。