I've just started to build an API & Some web app features, using Behat to test scenarios in a BDD fashion.
All is going well, I'm testing the API with a Rest Context and Web App bits with Mink.
However, I've reached a bit of a stumbling block in the automated tests...
I've created an API endpoint for a "Forgot Password" feature, which does the usual random hash/token effort, then emails a link to /reset-password/token
However, in order to automate testing of this URL using Mink I'd need to know the hash of the test user (created earlier in the test suite). Because it's random and will change every time a user requests a password reset, I'm a little stumped as to how I can test this!