ldc-arcadia-api/tests/Unit/Application/Usecase/Employees/FindAllEmployeesDtoTest.php

30 lines
849 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Application\Usecase\Employees;
use Application\Usecase\Employees\FindAll\Input;
use Domain\Models\ValueObjects\Employees\EmployeeSortColumn;
use Domain\Models\ValueObjects\Employees\EmployeeSorter;
use Shared\Pagination;
covers(
Input::class,
);
describe('FindAllEmployees Application DTOs Unit Tests', function (): void {
it('instantiates Input DTO', function (): void {
// GIVEN
$pagination = Pagination::ofPage(1, 25);
$sorter = new EmployeeSorter(EmployeeSortColumn::arcadiaId, \SortDirection::Ascending);
// WHEN
$input = new Input($pagination, $sorter);
// THEN
expect($input->pagination)->toBe($pagination)
->and($input->sorter)->toBe($sorter)
->and($input->filter)->toBeNull();
});
});