Behat / WebApiExtension

Behat extension to test web APIs
http://extensions.behat.org
MIT License
111 stars 114 forks source link

Add default options for guzzle client #68

Open omarlopesino opened 7 years ago

omarlopesino commented 7 years ago

Hi.

My use case is this: I need allow unverified https site in tests cause the environment doesn't have certificate.

I tried use key 'defaults' in my behat.yml but I saw this error:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option "defaults" under "testwork.web_api"

Here is my behat.yml

default: autoload: '': %paths.base%/tests/behat/bootstrap suites: default: paths:

  • %paths.base%/tests/behat/features contexts:
  • Behat\WebApiExtension\Context\WebApiContext: extensions: Behat\WebApiExtension\ServiceContainer\WebApiExtension: base_url: 'https://rest-testing.me/' defaults: verify: false ssl.certificate_authority: false

I attach a patch adding defaults key.

Can you review this, please? Thanks!