hash = 'abc123def456'; $this->assertSame( '/api/modules/sirsoft-board/boards/notice/attachment/abc123def456/preview', $attachment->previewUrlForSlug('notice') ); } #[Test] public function preview_url_accessor_delegates_to_single_assembly_point(): void { $attachment = new Attachment; $attachment->hash = 'abc123def456'; $attachment->mime_type = 'image/png'; $attachment->board_id = 0; // board 관계 미로딩 + 존재하지 않는 board_id → slug 는 빈 문자열로 조립 (기존 동작 보존) $this->assertSame( '/api/modules/sirsoft-board/boards//attachment/abc123def456/preview', $attachment->preview_url ); } }