Behat incorrect "undefined step reference" in PHPStorm

Behat incorrect "undefined step reference" in PHPStorm

Davo Smith གིས-
Number of replies: 0
Core developers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར

Posting this here as it came up in discussion at the UK/IE Moodle Moot DevJam.

For those of you who use PHPStorm for Moodle development, you may have noticed that certain (newer) Behat steps are not recognised by PHPStorm, e.g. 'I am on the "Test forum name" "forum activity" page'

This appears to be a bug in PHPStorm, as it cannot cope with steps that are defined with multiple regular expressions (in this case there are 4 regular expressions used to define the step, one for each option of quotes or no quotes around each of the variable parts).

The problem looks like this: Screenshot of error when PHPStorm does not recognise valid Behat step

If you use PHPStorm (and would like to see this fixed), please could you take a moment to visit this issue: https://youtrack.jetbrains.com/issue/WI-63425 and vote for it to be fixed (as I opened the ticket 7 months ago and it doesn't yet seem to have gained any attention yet from the PHPStorm developers).

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།:Useful (1)