Implement seeders for IncoSheet and IncoCompo to populate the database with initial data.
29 lines
699 B
PHP
29 lines
699 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Integration\Database\Seeders;
|
|
|
|
use Database\Seeders\IncoSheetSeeder;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Infra\Database\Models\IncoCompo;
|
|
use Infra\Database\Models\IncoSheet;
|
|
use Tests\TestCase;
|
|
|
|
covers(IncoSheet::class);
|
|
|
|
uses(TestCase::class, RefreshDatabase::class);
|
|
|
|
describe('IncoSheetSeeder Integration Test', function (): void {
|
|
it('seeds paired IncoSheet and IncoCompo entries', function (): void {
|
|
// GIVEN
|
|
$seeder = new IncoSheetSeeder();
|
|
|
|
// WHEN
|
|
$seeder->run();
|
|
|
|
// THEN
|
|
expect(IncoSheet::count())->toBe(3)
|
|
->and(IncoCompo::count())->toBe(3);
|
|
});
|
|
});
|