misc_pterodactyl-panel/tests/Traits/DatabaseMigrations.php
Lance Pioch 660c85aa97 Wip
2022-10-26 21:04:32 -04:00

22 lines
507 B
PHP

<?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);
}
}