misc_pterodactyl-panel/tests/Traits/DatabaseMigrations.php

23 lines
507 B
PHP
Raw Normal View History

2022-10-27 01:04:32 +00:00
<?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);
}
}