present($output); // THEN expect($view)->toBeInstanceOf(ToggleClientStatusView::class) ->and($view->id)->toBe($clientId->value) ->and($view->name)->toBe('Client 1') ->and($view->identifier)->toBe($identifier->value) ->and($view->isActive)->toBeTrue() ->and($view->statusLabel)->toBe('Active') ->and($view->message)->toBe("Client 'Client 1' (ID: {$clientId->value}) is now Active."); }); it('transforms Output into ToggleClientStatusView for inactive status', function (): void { // GIVEN $clientId = new ClientId(Uuid::uuid7()); $identifier = new ClientIdentifier('arcadia_id_' . str_repeat('b', 32)); $name = new ClientName('Client 2'); $output = new Output( clientId: $clientId, clientIdentifier: $identifier, clientName: $name, isActive: false, ); $presenter = new SetClientStatusPresenter(); // WHEN $view = $presenter->present($output); // THEN expect($view)->toBeInstanceOf(ToggleClientStatusView::class) ->and($view->isActive)->toBeFalse() ->and($view->statusLabel)->toBe('Inactive') ->and($view->message)->toBe("Client 'Client 2' (ID: {$clientId->value}) is now Inactive."); }); });