I'm using Symfony2 with Behat, Mink and the FosUser Bundle. The problem is that the login test always fails (the login works perfectly in development).
Scenario: A user can login
Given I am on "http://localhost:8888/myapp/web/login"
And fill in "username" with "[email protected]"
And fill in "password" with "pass"
And press "login"
Then I should see "Logout"
The test fails with The text "Logout" was not found anywhere in the text of the current page. Any idea on what's missing or how I could debug the problem?
I can test non-authenticated pages with Behat/Mink.
[Update]
The config_test is as follows (just the relevant bits):
## Security Configuration
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
providers:
main:
users:
[email protected]: { password: senha, roles: ROLE_ADMIN }
firewalls:
secured_area:
pattern: ^/
http_basic: true
logout: true
security: true
anonymous: true