title: How to access Laravel instance when doing integration tests?
body: <p>I am working on writing tests using Codeception + Selenium + PhantomJS. 
  The problem that I have is that I need to mock various classes and bind different implementations in different tests (sometimes mocks of a classes with predefined results returned by their methods). </p>
  
  <p>When writing Unit tests with PHPUnit that is easy: </p>
  
  <pre><code>    $setterMock = Mockery::mock(MyClass::class);
  
      $setterMock-&gt;shouldReceive('classMethod')
                  -&gt;andReturn('result');
  
      $this-&gt;app-&gt;instance(MyClass::class, $setterMock);
  </code></pre>
  
  <p>But when writing Integration Tests I don't know how to access the $app instance. I have tried to apply  similar code in __bootstrap.php inside the acceptance tests folder, but it did not work. </p>