title: How can I make the Laravel5 Codeception module not care if my database entities are Eloquent models?
body: <p>I'm updating our codebase to use Laravel 5.2 which includes a bunch of unit tests that use codeception. Originally, the code was written using plain Doctrine2, which I updated to use LaravelDoctrine. With that change came the need to update the tests to use the codeception Laravel5 module.</p>
  
  <p>Now, the tests were originally written as such </p>
  
  <pre><code>public function someTest(SomeTestObject $I) {
          $I-&gt;wantTo('Some test objective');
  
          $I-&gt;amOnPage('/some/page.php?parameter=678');
          $I-&gt;waitForText('Text');
  
          $I-&gt;click('Somelink');    
  
          $I-&gt;seeInRepository('My/Models/SomeObject', ['columnName' =&gt; 678]);
  }
  </code></pre>
  
  <p>and they work and <a href="https://youtu.be/StTqXEQ2l-Y?t=5s" rel="nofollow noreferrer">everything is awesome</a>. </p>
  
  <p>Once I updated to use the Laravel5 module, The <code>$I-&gt;seeInRepository(...</code> isn't generated by codeception in the <code>AcceptanceTesterActions.php</code> file, so I can't use it anymore. I tried a couple other methods that were there instead -- <code>canSeeReord</code>, <code>seeInDatabase</code> -- but they throw the exception</p>
  
  <pre><code>[RuntimeException] Class SomeObject is not an Eloquent model
  </code></pre>
  
  <p>I understand that because <code>SomeObject</code> actually <em>isn't</em> an Eloquent model but... who cares? The test worked before, and using the website works everywhere (LaravelDoctrine's tagline is "A drop-in Doctrine2 implementation for Laravel 5+" which it sort of is so that's cool). </p>
  
  <p>We have a ton of models and some complicated structure to the current model set to which a complete rewrite simply isn't in scope... </p>
  
  <p>I looked at the module code in Laravel5.php, and the exception and module looks pretty coupled to Eloquent models:</p>
  
  <pre><code>/**
   * @param string $modelClass
   *
   * @return EloquentModel
   */
  protected function getQueryBuilderFromModel($modelClass)
  {
      $model = new $modelClass;
  
      if (!$model instanceof EloquentModel) {
          throw new \RuntimeException("Class $modelClass is not an Eloquent model");
      }
  
      return $model-&gt;newQuery();
  }
  </code></pre>
  
  <p>Is there a way around this?</p>