TenantAtlas/tests/Feature/Filament/ResolvedReferenceUnsupportedClassTest.php
2026-03-10 19:51:41 +01:00

31 lines
1023 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Support\Facades\Blade;
it('renders unsupported references without hiding the preserved identifier', function (): void {
$html = Blade::render(
"@include('filament.infolists.entries.resolved-reference-compact', ['reference' => \$reference])",
[
'reference' => [
'primaryLabel' => 'Legacy provider object',
'secondaryLabel' => 'External object',
'stateLabel' => 'Unresolved',
'stateColor' => 'gray',
'stateIcon' => 'heroicon-m-question-mark-circle',
'showStateBadge' => true,
'isLinkable' => false,
'linkTarget' => null,
'technicalDetail' => [
'displayId' => '…abcd1234',
],
],
],
);
expect($html)->toContain('Legacy provider object')
->and($html)->toContain('Unresolved')
->and($html)->toContain('…abcd1234');
});