title: Behat/Mink/PageObjects - page object class not found
body: <p>Setting up testing with behat for my project... I got most of the things working - except the page objects.  Here's my behat.yml</p>
  
  <pre><code>default:
    autoload: [%paths.base%/boostrap]
    suites:
      web:
        paths: [%paths.base%/features/web]
        contexts:
          - Web\LoginContext
      api:
        paths: [%paths.base%/features/api]
        contexts:
          - Api\ApiContext
    extensions:
      Behat\MinkExtension:
        base_url: http://my.url.com
        selenium2: ~
      SensioLabs\Behat\PageObjectExtension:
        namespaces:
          page: [Page]
          element: [Page\Element]
  </code></pre>
  
  <p>I am following the <a href="http://behat-page-object-extension.readthedocs.io/en/latest/" rel="nofollow">PageObjectExtention documentation</a>. I have created <code>LoginPage</code> class, which extends from <code>Page</code> and updated my context file to use page injection.</p>
  
  <p>My LoginPage class looks like this:</p>
  
  <pre><code>&lt;?php
  
  namespace Page;
  
  use SensioLabs\Behat\PageObjectExtension\PageObject\Page;
  
  class LoginPage extends Page
  {
  
  }
  </code></pre>
  
  <p>and my Context file looks like this:</p>
  
  <p>
  
  <pre><code>namespace Web;
  
  use Behat\Behat\Tester\Exception\PendingException;
  use Page\LoginPage;
  
  class LoginContext extends MednavMinkContext
  {
      private $loginPage;
  
      public function __construct(LoginPage $homepage)
      {
          $this-&gt;loginPage = $homepage;
      }
  
      ...
  }
  </code></pre>
  
  <p>Yet, when I try to run it, I get</p>
  
  <pre><code>[ReflectionException]                
  Class Page\LoginPage does not exist  
  </code></pre>
  
  <p>Where should these page objects be stored?  I tried all possible locations - under <code>Page</code> inside boostrap, under <code>Page</code> in the root, and a couple of other - no luck.</p>