1
在我们的项目中智能卡身份验证时,其中卡包含用户certificete。
我想测试我的控制器,但它有一些if (!$this->security->isGranted(...)) throw new AccessDeniedException();
行。Symfony的功能测试:绕过安全
如何绕过功能测试中的所有安全验证?
在我们的项目中智能卡身份验证时,其中卡包含用户certificete。
我想测试我的控制器,但它有一些if (!$this->security->isGranted(...)) throw new AccessDeniedException();
行。Symfony的功能测试:绕过安全
如何绕过功能测试中的所有安全验证?
有一个答案:How to use an authenticated user in a Symfony2 functional test?
在配置不同security
部分应该被使用。
可能的重复[如何在Symfony2功能测试中使用经过身份验证的用户?](http://stackoverflow.com/questions/6535873/how-to-use-an-authenticated-user-in-a-symfony2 -功能测试) – gronostaj 2017-01-04 16:23:20