Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Access Fuel classes from Behat Context
  • Hi,

    I'm trying to use Behat to feature test a Reset Password form.

    As the hash is random each time the Forgot Password feature is run, I thought adding a custom step to my Behat context would be the best way to go.

    However, as the BehatContext is outside my Fuel installation, I'd like to know if there's any way to access the FuelPHP ORM methods - so I can search the user table by using Model_User::find)by_email() for example. I guess I'd have to include/require/use some files in my BehatContext file.

    Alternatively I guess I could drop out to shell and run an oil command?

    Any help would be greatly appreciated!
  • Oil is always an option, but since it's a plain SQL table, can't you run a query directly?

    disclaimer: never used Behat. ;-)
  • I guess I could just run a query! Guess I'm just being lazy! Cheers Harro ;)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion