trypost/tests/Unit/Services
Paulo Castellano 3bc481ac07 Make LogoAttacher honor its swallow-all contract; drop the caller try/catch
LogoAttacher::attach promised in its docblock that any failure — including a
persistence error — is logged and swallowed so the caller need not handle it.
But the persistence block was try/finally with no catch, so a Throwable from
clearMediaCollection/addMediaFromPath escaped. Both call sites (store and
updateSettings) each wrapped the call in an identical try/catch + Log::warning
to compensate — a band-aid duplicated across the controller.

Fix it at the root: the persistence block now catches Throwable, logs it, and
returns false, matching the documented contract. Both controller call sites
collapse to a single attach() line, and the now-unused Log/Throwable imports
are dropped.

Adds LogoAttacherTest covering the success path, the swallowed persistence
failure, a failed fetch, and a rejected mime type.
2026-07-03 20:15:37 -03:00
..
Ai Centralize supported content languages in a ContentLanguage enum 2026-07-03 14:12:25 -03:00
Brand Make LogoAttacher honor its swallow-all contract; drop the caller try/catch 2026-07-03 20:15:37 -03:00
Image Structure brand voice and make generated copy platform-aware 2026-06-12 17:09:39 -03:00
Media test(tiktok): cover MediaItem dimensions and platform max-width helpers 2026-06-26 12:31:46 -03:00
Social Stop Meta rate-limit errors from disconnecting Instagram/Threads tokens 2026-07-03 11:07:54 -03:00
MediaSearchKeyFallbackTest.php fix(media): don't 500 when the Unsplash/Giphy key is set to null 2026-07-01 12:16:15 -03:00