Behat Drupal Extension 3 pass custom cUrl options to goutte driver

Behat is great testing tool that there are already has a lot of documentation.

In drupal we have extension that helps us to build tests. Behat tests are configurable in yaml file (like url of your website and other options). Lately I needed to set custom cUrl options (goutte driver) and because Drupal extension 3 uses Guzzle 4 library it was not that obvious how to do that.

Trick is to check how Guzzle expects options http://guzzle.readthedocs.org/en/latest/faq.html#how-can-i-add-custom-cu... and then place in behat.yml file in the following way:

Technically options being added at https://github.com/guzzle/guzzle/blob/4.2.3/src/Adapter/Curl/CurlFactory... so if you need to make sure your options were passed, debug that function.

Hope this will save you some time.