title: Behat with Mink
body: <p>Does anyone know how to successfully configure Mink to work with Behat? In case if anyone doesn't know, Behat is a BDD(Behaviour-Driven Development) framework for PHP and Mink provides a browser emulators abstraction layer to test with.</p>
  
  <p>You can find out more about Behat at <a href="http://behat.org/" rel="nofollow">http://behat.org/</a> and Mink at <a href="https://github.com/Behat/Mink" rel="nofollow">https://github.com/Behat/Mink</a> or <a href="http://www.knplabs.com/fr/blog/one-mink-to-rule-them-all" rel="nofollow">http://www.knplabs.com/fr/blog/one-mink-to-rule-them-all</a></p>
  
  <p>Basically i followed the instructions at <a href="http://www.knplabs.com/fr/blog/one-mink-to-rule-them-all" rel="nofollow">http://www.knplabs.com/fr/blog/one-mink-to-rule-them-all</a> to configure my Mink to work with my Behat. My <em>behat.yml</em>, the one located inside the Behat folder, not the Mink folder, is as follows:</p>
  
  <pre><code>default:
    paths:
      features:               %%BEHAT_CONFIG_PATH%%/features
      formatter:
      name:                   progress
  pretty:
    formatter:
      name:                   pretty
      parameters:
        multiline_arguments:  false
  default:
      environment:
          parameters:
              start_url: http://localhost/
  imports:
      - mink/behat.yml
  </code></pre>
  
  <p>I also have the following code in my <strong>features/support/boostrap.php</strong></p>
  
  <pre><code>require_once 'mink/autoload.php';
  </code></pre>
  
  <p>However, having the following code in my <strong>features/support/env.php</strong></p>
  
  <pre><code>$world-&gt;client = new \Goutte\Client;
  </code></pre>
  
  <p>would give me a <strong>PHP Fatal error:  Class 'Goutte\Client' not found</strong> in terminal(OSX) when i use the behat command. This happens even if i have the <strong>goutte.phar</strong> inside my <strong>behat/Mink/Vendor/Goutte</strong> folder.</p>
  
  <p>Hope anyone can enlighten me on where i went wrong and if there was any part in the question where I wasn't being clear about it, do let me know. Thanks a lot.</p>