Resolve from step in Gherkin file to Context file
Hover step in Gherkin file with Ctrl (Cmd on Mac OS) hotkey pressed and get relevant method from the Context file highlighted. Clicking on appeared link immediately navigates you to the declaration. You can also navigate to the method declaration in the Context file with Ctrl+B (Cmd-B on Mac OS) with an editor caret placed at the step in Gherkin file. Image Added
As soon as navigation action is invoked, you are navigated to the very method in Context file (FeatureContext.php in our case):
Find Usages from Context file to usages in Gherkin files
From any Context file you can find all the usages of this method in all *.feature files. Just place a caret at the method name and invoke Alt-F7 (or context menu action Find Usages). You will see all the usages of desired method in project files: Image Added
Keyword and step completion
All the keywords and steps are completed with a basic code completion action (Ctrl+Space) in *.feature files. All the steps are indexed from current project. Image Added
Generation for undefined steps
If any of steps in you *.feature file are undefined, the PhpStorm will spot that in a moment highlighting step in question: Image Added
Press Alt+Enter (or click on the light bulb) to get list of relevant quick fixes, and select the one named Create Step Definition.
You will be immediately offered to choose step definition file from your project or create a new one.
In case of choosing already existing step definition file, step definition will be immediately created with relevant PHPDoc:
In case you would like to create a new file, this option should be selected from the list on the previous step:
Create New Step Definition File dialog will appear providing you an opportunity to set a file name, file type and file location:
As soon as you are done with these options, a new step definition file will be created:
Make sure to report any bugs and feature requests related to Behat functionality to the Issue Tracker.