title: Codeception. Laravel Controller Dependency Injection
body: <p>How do I replace <code>sendMessageService</code> in <code>CreateVacationCest</code> with a mock? </p>
  
  <p>Controller</p>
  
  <pre><code>class BotController extends Controller
  {
      private $sendMessageService;
  
      public function __construct(SendMessageService $sendMessageService)
      {
          $this-&gt;sendMessageService = $sendMessageService;
      }
  }
  </code></pre>
  
  <p>Cest Class</p>
  
  <pre><code>class CreateVacationCest
  {
      public function testVacationStatus(ApiTester $I)
      {
          $I-&gt;sendPOST('/test', ['message' =&gt; 'test']);
      }
  }
  </code></pre>