ldc-arcadia-api/tests/Integration/Infra/Database/Models/EmployeeModelTest.php
Jérémy Munsch 152ee2b5a2
feat(api): add IncoSheets feature with DDD clean architecture, tests & OpenAPI spec
- Use cases: FindAllIncoSheets & FindIncoSheet (filters, pagination, short projection)
- Presentation: controllers, FormRequests with scalar validation, DTOs (camelCase)
- Ports & Adapters: IncoSheetDirectory & EloquentIncoSheetDirectory
- Tests: Pest 4 unit, integration, OpenAPI spectator conformance, dynamic arch tests
- Docs: updated Bruno collection and OpenAPI spec
2026-08-14 11:33:05 +02:00

27 lines
741 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Integration\Infra\Database\Models;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Infra\Database\Models\Employee;
use Tests\TestCase;
covers(Employee::class);
uses(TestCase::class, RefreshDatabase::class);
describe('Employee Eloquent Model & Factory', function (): void {
it('creates and persists an Employee record via factory', function (): void {
// GIVEN
$employee = Employee::factory()->create();
// WHEN
$retrieved = Employee::find($employee->public_employee_number);
// THEN
expect($retrieved)->not->toBeNull()
->and($retrieved->public_employee_number)->toBe($employee->public_employee_number);
});
});