bootstrap.php 734 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Contracts\Console\Kernel;
  3. require_once __DIR__.'/../vendor/autoload.php';
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Bootstrap The Test Environment
  7. |--------------------------------------------------------------------------
  8. |
  9. | You may specify console commands that execute once before your test is
  10. | run. You are free to add your own additional commands or logic into
  11. | this file as needed in order to help your test suite run quicker.
  12. |
  13. */
  14. $commands = [
  15. 'config:cache',
  16. 'event:cache',
  17. ];
  18. $app = require __DIR__.'/../bootstrap/app.php';
  19. $console = tap($app->make(Kernel::class))->bootstrap();
  20. foreach ($commands as $command) {
  21. $console->call($command);
  22. }