28 lines
613 B
PHP
28 lines
613 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Tests\Integration\Database\Seeders;
|
||
|
|
|
||
|
|
use Database\Seeders\EmployeeSeeder;
|
||
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||
|
|
use Infra\Database\Models\Employee;
|
||
|
|
use Tests\TestCase;
|
||
|
|
|
||
|
|
covers(Employee::class);
|
||
|
|
|
||
|
|
uses(TestCase::class, RefreshDatabase::class);
|
||
|
|
|
||
|
|
describe('EmployeeSeeder Integration Test', function (): void {
|
||
|
|
it('seeds default employee records into the database', function (): void {
|
||
|
|
// GIVEN
|
||
|
|
$seeder = new EmployeeSeeder();
|
||
|
|
|
||
|
|
// WHEN
|
||
|
|
$seeder->run();
|
||
|
|
|
||
|
|
// THEN
|
||
|
|
expect(Employee::count())->toBe(4);
|
||
|
|
});
|
||
|
|
});
|