forked from laravel/laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use Illuminate\Contracts\Console\Kernel; | ||
use PHPUnit\Runner\AfterLastTestHook; | ||
use PHPUnit\Runner\BeforeFirstTestHook; | ||
|
||
class Bootstrap implements BeforeFirstTestHook, AfterLastTestHook | ||
{ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Bootstrap The Test Environment | ||
|-------------------------------------------------------------------------- | ||
| | ||
| You may specify console commands that execute once before your test is | ||
| run. You are free to add your own additional commands or logic into | ||
| this file as needed in order to help your test suite run quicker. | ||
| | ||
*/ | ||
|
||
use CreatesApplication; | ||
|
||
public function executeBeforeFirstTest(): void | ||
{ | ||
$console = $this->createApplication()->make(Kernel::class); | ||
|
||
$commands = [ | ||
'config:cache', | ||
'event:cache', | ||
]; | ||
|
||
foreach ($commands as $command) { | ||
$console->call($command); | ||
} | ||
} | ||
|
||
public function executeAfterLastTest(): void | ||
{ | ||
array_map('unlink', glob('bootstrap/cache/*.phpunit.php')); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.