2

On a sandbox install of Drupal running behat under the Behat Drupal Extension, I'm trying to fun the following feature:

@api
  Scenario: Logged in User
    Given I am logged in as a user with the "administrator" role
    And I am on '/user'
    Then I should see the heading "User"

Inital cURL error

I get this error complaining about the SSL certificate.

cURL error 60: Issuer certificate is invalid. (GuzzleHttp\Exception\RequestException)

My first attempt to ignore fails

This makes sense. This is a sandbox on RHEL 7 where I just activated mod_ssl. In order to try to ignore this, I added the ssl.certificate_authority: false to behat.yml. Since that I now see this...

No method can handle the ssl.certificate_authority config key (InvalidArgumentException)

behat.yml set up

 default:
      suites:
        default:
          contexts:
            - FeatureContext
            - Drupal\DrupalExtension\Context\DrupalContext
            - Drupal\DrupalExtension\Context\MinkContext
      extensions:
        Behat\MinkExtension:
          goutte: ~
          sessions:
            my_session:
              goutte:
                guzzle_parameters:
                  ssl.certificate_authority: false
          selenium2: ~
          base_url: http://localhost
        Drupal\DrupalExtension:
          blackbox: ~
          api_driver: 'drupal'
          drush:
            alias: 'local'
          drupal:
            drupal_root: '/var/www/html'

Update Based on information from the Github issue queue, I have changed my

2

After reading on https://github.com/Behat/MinkExtension/blob/master/doc/index.rst#drivers, I tried the following in the behat.yml file.

default:
  suites:
    default:
      contexts:
        - FeatureContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
  extensions:
    Behat\MinkExtension:
      goutte:
        guzzle_parameters:
          verify: false
      selenium2: ~
      base_url: http://localhost
    Drupal\DrupalExtension:
      blackbox: ~
      api_driver: 'drupal'
      drush:
        alias: 'local'
      drupal:
        drupal_root: '/var/www/html'

It worked.

I needed to find out how to tell Guzzle/cURL to not worry about validating any CERT. Again, I would not do this under a production server, but for the sake of a local development environment, I'd give it a go.

  • Didn't work for me. – aaronbauman Nov 24 '15 at 22:09
  • for me either :( – Codium Jun 4 '18 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.