Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

I would like to use MinkContext in two different Contexts. #348

Open
mtopcu opened this issue Aug 8, 2019 · 1 comment
Open

I would like to use MinkContext in two different Contexts. #348

mtopcu opened this issue Aug 8, 2019 · 1 comment

Comments

@mtopcu
Copy link

mtopcu commented Aug 8, 2019

I would like to use MinkContext functions in FeatureContext and other Context named as ApiContext. But when I try to use, I got below error.

Is there anyone who solved this issue? Thanks.

Step "the response should be json" is already defined in FeatureContext::theResponseShouldBeJson()

My FeatureContext class like: class FeatureContext extends MinkContext
My ApiContext class like: class ApiContext extends FeatureContext implements Context

And my behat yml is like:

default:
  suites:
    default:
      contexts:
        - FeatureContext:
            parameters:
        - ApiContext:
            parameters:

  extensions:
    Behat\MinkExtension:
      base_url: http://api-v2-int.somc.io/
      browser_name: chrome
      default_session: default
      javascript_session: selenium2
      sessions:
        default:
          goutte:
            guzzle_parameters:
              verify: false
        selenium2:
          selenium2:
            wd_host: http://127.0.0.1:4444/wd/hub
            capabilities: {browserVersion:  , version:  }
@mtopcu mtopcu closed this as completed Aug 8, 2019
@mtopcu
Copy link
Author

mtopcu commented Aug 8, 2019

I need to remove FeatureContext in behat.yml. Now it works. But this time, I cant set parameters for FeatureContext.

@mtopcu mtopcu reopened this Aug 8, 2019
@mtopcu mtopcu changed the title I would like to use MinkContext in two different Context. I would like to use MinkContext in two different Contexts. Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant