22 lines
721 B
PHP
22 lines
721 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Support\Navigation\RelatedActionLabelCatalog;
|
|
|
|
it('returns consistent entry and action labels', function (): void {
|
|
$catalog = new RelatedActionLabelCatalog;
|
|
|
|
expect($catalog->entryLabel('baseline_snapshot'))->toBe('Snapshot')
|
|
->and($catalog->actionLabel('baseline_snapshot'))->toBe('View snapshot')
|
|
->and($catalog->entryLabel('source_run'))->toBe('Run')
|
|
->and($catalog->actionLabel('operations'))->toBe('Open operations');
|
|
});
|
|
|
|
it('returns safe unavailable copy', function (): void {
|
|
$catalog = new RelatedActionLabelCatalog;
|
|
|
|
expect($catalog->unavailableMessage('parent_policy', 'unauthorized'))
|
|
->toContain('current scope');
|
|
});
|