Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option or stop marking keywords for BDD as [Annotations] Class not found #202

Closed
pkly opened this issue Jul 1, 2020 · 2 comments
Closed

Comments

@pkly
Copy link

pkly commented Jul 1, 2020

Recently we've started using BDD with Behat, which basically creates functions in classes like the following

    /**
     * @Given /^there should be (\d+) items? in the cart$/
     */
    public function thereShouldBeItemsInTheCart(int $arg1)

The @Given keyword is used by Behat to search for appropriate functions to run during a test like

Scenario: Testing adding to cart
  Given there should be 1 item in the cart
  Then add another item to cart

The @Given, @When and @Then keywords via annotations are incorrectly marked as missing.
If possible it'd be great to have these be available for autocompletion at all times (no imports are required in this case), but not show up as a warning when being used without an import.
Perhaps mark them with a weak warning when they've actually been imported?

@ovgray
Copy link

ovgray commented Jul 11, 2020

+1

Haehnchen added a commit that referenced this issue Jul 12, 2020
Haehnchen added a commit that referenced this issue Jul 12, 2020
Haehnchen added a commit that referenced this issue Jul 12, 2020
@Haehnchen
Copy link
Owner

done, by just adding the values but i still think about this feature in general for its noise ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants