在我们的项目中使用智能卡身份验证,其中卡包含用户证书。
我想测试我的控制器,但它有一些if (!$this->security->isGranted(...)) throw new AccessDeniedException();线路。
如何绕过功能测试中的所有安全验证?
发布于 2013-05-14 16:21:27
答案是:How to use an authenticated user in a Symfony2 functional test?
应使用配置中的不同security部分。
https://stackoverflow.com/questions/16478767
复制相似问题