misc_pterodactyl-panel/tests/Traits/DatabaseMigrations.php
2022-10-27 21:46:14 -04:00

25 lines
593 B
PHP

<?php
namespace Pterodactyl\Tests\Traits;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands;
use Illuminate\Foundation\Testing\DatabaseMigrations as DM;
trait DatabaseMigrations
{
use CanConfigureMigrationCommands;
use DM;
/**
* Define hooks to migrate the database before and after each test.
*
* @return void
*/
public function runDatabaseMigrations()
{
$this->artisan('migrate:fresh', $this->migrateFreshUsing());
$this->app[Kernel::class]->setArtisan(null);
}
}