I have application which base on logging users by FOSOAuthServerBundle
and I want to test actions in this application.
So... In Sf2 are special config file for testing environment, config_test.yml
and I've put this code:
security:
firewalls:
default:
anonymous: ~
In theory it should solve my problem, because this firewall allows anyone access any action. I've put it in config_test.yml
, so it should work only then I'm testing application. Good solution, I was thinking.
But Sf threw this error:
You are not allowed to define new elements for path "security.firewalls". Please define all elements for this path in one config file.
My questions is: How can I allow access actions without logging while testing application by PHPUnit?