Files
Test-Laravel-Migrations/tests/Feature/MigrationsTest.php
T

24 lines
664 B
PHP
Raw Normal View History

2021-11-08 11:50:12 +02:00
<?php
namespace Tests\Feature;
use Illuminate\Support\Facades\Artisan;
use Tests\TestCase;
class MigrationsTest extends TestCase
{
// !!! IMPORTANT: TESTS ARE CONFIGURED TO RUN ON A LOCAL MYSQL DATABASE
// WHICH SHOULD BE CALLED "mysql_testing"
// !!! DON'T FORGET TO CREATE THAT DATABASE
// !!! NOTICE: THAT DB WILL BE WIPED A LOT WITHIN TESTS BY "migrate:fresh"
public function test_successful_foreign_key_tasks()
{
// We just test if the migration succeeds or throws an exception
$this->expectNotToPerformAssertions();
Artisan::call('migrate:fresh', ['--path' => '/database/migrations/task1']);
}
}