Wip
This commit is contained in:
parent
f38f8db445
commit
660c85aa97
3 changed files with 97 additions and 0 deletions
22
tests/Traits/DatabaseMigrations.php
Normal file
22
tests/Traits/DatabaseMigrations.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Tests\Traits;
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands;
|
||||
|
||||
trait DatabaseMigrations
|
||||
{
|
||||
use CanConfigureMigrationCommands;
|
||||
|
||||
/**
|
||||
* Define hooks to migrate the database before and after each test.
|
||||
*
|
||||
*/
|
||||
public function runDatabaseMigrations(): void
|
||||
{
|
||||
$this->artisan('migrate:fresh', $this->migrateFreshUsing());
|
||||
|
||||
$this->app[Kernel::class]->setArtisan(null);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue