generated from Nodarx/template
feat: serve message fetches from the cache
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -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]];
|
||||
|
||||
@@ -36,6 +36,12 @@ final class FakeMessageFileStore extends MessageFileStore
|
||||
$this->files = [];
|
||||
}
|
||||
|
||||
/** Direct access for tests */
|
||||
public function content(int $uidValidity, int $uid): ?array
|
||||
{
|
||||
return $this->files[$uidValidity][$uid] ?? null;
|
||||
}
|
||||
|
||||
/** @return int[] */
|
||||
public function uids(int $uidValidity): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user