Hi! I've run into a problem with the extension while running behat tests on a site which redirects to HTTPS for login.
However I'm not really sure if it is really related for the drupal extension, or something else.

When I run the tests with bin/behat I get the following error:

cURL error 60: SSL certificate problem: Invalid certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (GuzzleHttp\Exception\RequestException)

My behat.yml configuration:

default:
  suites:
    default:
      contexts:
        - FeatureContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
        - Drupal\DrupalExtension\Context\MessageContext
        - Drupal\DrupalExtension\Context\DrushContext
  extensions:
    Behat\MinkExtension:
      #selenium2: ~
      goutte:
        guzzle_parameters:
          verify: false
      base_url: https://localsite.dev
    Drupal\DrupalExtension:
      blackbox: ~
      api_driver: 'drupal'
      drush:
        alias: 'local'
      drupal:
        drupal_root: 'www'
      region_map:
        head_title: 'head > title'
      selectors:

Comments

yce created an issue. See original summary.

Surjya1981’s picture

You can add few more line in guzzle_parameters:

         verify: false
          curl.options:
              CURLOPT_SSL_VERIFYPEER: false
              CURLOPT_CERTINFO: false
              CURLOPT_TIMEOUT: 120
          ssl.certificate_authority: false

Also check your curl.cainfo in php.ini file, if it is having right path with the updated file.

clemens.tolboom’s picture

Category: Bug report » Support request
Priority: Major » Normal
dlaufer’s picture

The solution in #2 worked for me!

jaydub’s picture

I followed the advice here:

https://github.com/Behat/MinkExtension/blob/master/doc/index.rst#drivers

Specifically the following:

default:
    extensions:
        Behat\MinkExtension:
            sessions:
                my_session:
                    goutte:
                        guzzle_parameters:
                            verify: false

It works for me with that change.