ldc-arcadia-api/tests/Unit/Presentation/Api/V1/Presenters/IncoSheets/IncoSheetsShowPresenterTest.php

29 lines
861 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Presentation\Api\V1\Presenters\IncoSheets;
use Presentation\Api\V1\Presenters\IncoSheets\IncoSheetsShowPresenter;
use Presentation\Api\V1\Presenters\IncoSheets\IncoSheetsShowView;
use Tests\Support\Mothers\IncoSheetMother;
covers(
IncoSheetsShowPresenter::class,
IncoSheetsShowView::class,
);
describe('IncoSheetsShowPresenter Unit Tests', function (): void {
it('transforms Output into IncoSheetsShowView', function (): void {
// GIVEN
$output = IncoSheetMother::createOutput(id: '1000101', name: 'Poulet Rôti');
$presenter = new IncoSheetsShowPresenter();
// WHEN
$view = $presenter->present($output);
// THEN
expect($view)->toBeInstanceOf(IncoSheetsShowView::class)
->and($view->output)->toBe($output);
});
});