bootstrap.php 765 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Illuminate\Contracts\Console\Kernel;
  3. require_once __DIR__.'/../vendor/autoload.php';
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Bootstrap the testing environment
  7. |--------------------------------------------------------------------------
  8. |
  9. | You have the option to specify console commands that will execute before your
  10. | test suite is run. Caching config, routes, & events may improve performance
  11. | and bring your testing environment closer to production.
  12. |
  13. */
  14. $commands = [
  15. 'config:cache',
  16. 'event:cache',
  17. // 'route:cache',
  18. ];
  19. $app = require __DIR__.'/../bootstrap/app.php';
  20. $console = tap($app->make(Kernel::class))->bootstrap();
  21. foreach ($commands as $command) {
  22. $console->call($command);
  23. }