mirror of
https://github.com/10h30/Test-Laravel-Migrations.git
synced 2026-06-05 15:07:54 +09:00
Task 7 - automatic column value
This commit is contained in:
@@ -86,4 +86,13 @@ class MigrationsTest extends TestCase
|
||||
Company::create(['name' => 'Company One']);
|
||||
Company::create(['name' => 'Company One']);
|
||||
}
|
||||
|
||||
public function test_automatic_value()
|
||||
{
|
||||
Artisan::call('migrate:fresh', ['--path' => '/database/migrations/task7']);
|
||||
|
||||
Company::create([]);
|
||||
$company = Company::first();
|
||||
$this->assertEquals('My company', $company->name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user