Closed rdohms closed 10 years ago
Yes, this is something missing from the extension. We didn't have a use case for this when using Behat, so didn't implement it. A PR would be welcome. Thanks.
@robocoder i have done it will submit along with the other stuff when i finish it off.
So how do you reference something like "Given I'm logged in as userX" over there? Or in your context, we have a "If i'm an Admin" step that internally loads user#admin
but we still use the reference to go grab the user, not querying, do you query the DB to grab that stuff?
We're using LDAP for authentication.
For login, we have:
When I login with "X"
is a step for the login page where the context uses a login page objectGiven I am logged in as "X"
is an auto-login step
I seem to recall that the ICTestBundle does this, but in this case here i notice that if a DB backup is loaded the ReferenceRepository is empty.
I'm implementing ReferenceAware behaviour for Behat 3.0 and will need to tackle this here as well. If there is anything that has already been done in this direction please point me in this direction, otherwise i'll port from the TestBundle.