/tests/CreatesApplication.php

https://bitbucket.org/mdoviedor/hotelium · PHP · 25 lines · 14 code · 6 blank · 5 comment · 0 complexity · a23c944b0d9ea24dd52055750af817fd MD5 · raw file

  1. <?php
  2. namespace Tests;
  3. use Illuminate\Contracts\Console\Kernel;
  4. use Illuminate\Support\Facades\Hash;
  5. trait CreatesApplication
  6. {
  7. /**
  8. * Creates the application.
  9. *
  10. * @return \Illuminate\Foundation\Application
  11. */
  12. public function createApplication()
  13. {
  14. $app = require __DIR__.'/../bootstrap/app.php';
  15. $app->make(Kernel::class)->bootstrap();
  16. Hash::driver('bcrypt')->setRounds(4);
  17. return $app;
  18. }
  19. }