feat: serve message fetches from the cache

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-10-07 22:20:13 -04:00
parent b1e92e5b07
commit 5e458c5bc8
7 changed files with 261 additions and 4 deletions
@@ -96,6 +96,15 @@ final class FakeLiveMailService extends LiveMailService
return $this->found;
}
/** @var array<int, array<string, string>> full section content by UID */
public array $sections = [];
public function messageSections(string $collection, int $uid, string ...$partIds): array
{
$this->calls[] = ['messageSections', [$collection, $uid, $partIds]];
return array_intersect_key($this->sections[$uid] ?? [], array_flip($partIds));
}
public function entityPatch(string $collection, array $flagsToAdd = [], array $flagsToRemove = [], int ...$uids): void
{
$this->calls[] = ['entityPatch', [$collection, $flagsToAdd, $flagsToRemove, $uids]];