我正在尝试测试项目但由于此错误而无法检查登录页面:
[RuntimeException] Call to undefined method AcceptanceTester::loadSessionSnapshot
这是我的代码:
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('Login');
$I->amOnPage('/');
if($I->loadSessionSnapshot('loggedin')) exit();
$I->dontSee('NotFound');
//$I->dontSee('Error');
$csrf = $I->grabCookie('_token');
$I->submitForm('.form',array('login'=>array(
'username'=>'username',
'password'=>'*******'
)
));
$I->saveSessionSnapshot('loggedin');
$I->see('username');
Run Code Online (Sandbox Code Playgroud)
我的配置是这样的
# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://myweb.com
- \Helper\Acceptance
Run Code Online (Sandbox Code Playgroud)
我使用命令行命令生成了它
codecept.bat generate:cept acceptance loginTest
Run Code Online (Sandbox Code Playgroud) 我一直在开发一个websocket服务器,直到最近我遇到了413实体太大错误。我在我的服务器上使用ratchetphp。有人遇到过这种情况吗?我能做些什么来避免这种情况发生吗?如果我无能为力,请帮助我重新创建此错误,当前解决此问题的解决方案是清除浏览器的缓存。我只能通过使用 Chrome 检查开发人员工具上的网络选项卡来发现此错误,但是如果客户端在不了解开发人员工具的情况下连接到服务器,我如何让他们知道他们需要清除缓存?