22 lines
576 B
PHP
22 lines
576 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Support\References\ReferenceLinkTarget;
|
|
|
|
it('serializes reference link targets', function (): void {
|
|
$target = new ReferenceLinkTarget(
|
|
targetKind: 'policy_version',
|
|
url: '/admin/t/1/policy-versions/42',
|
|
actionLabel: 'View policy version',
|
|
contextBadge: 'Tenant',
|
|
);
|
|
|
|
expect($target->toArray())->toBe([
|
|
'targetKind' => 'policy_version',
|
|
'url' => '/admin/t/1/policy-versions/42',
|
|
'actionLabel' => 'View policy version',
|
|
'contextBadge' => 'Tenant',
|
|
]);
|
|
});
|