feat(audit) : pagination défaut 10 + filtres employé/utilisateur en select

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 11:52:20 +02:00
parent e6a84af9b5
commit 06e462ef31
6 changed files with 37 additions and 13 deletions
+12 -3
View File
@@ -77,13 +77,22 @@ final class AuditLogProviderTest extends TestCase
self::assertNull($repo->findArgs['actions']);
}
public function testPerPageOutOfRangeFallsBackTo50(): void
public function testPerPageOutOfRangeFallsBackToDefault(): void
{
$repo = $this->spyRepository();
$response = $this->provideWith($repo, ['perPage' => '999']);
self::assertSame(50, $repo->findArgs['limit']);
self::assertSame(50, json_decode((string) $response->getContent(), true)['perPage']);
self::assertSame(10, $repo->findArgs['limit']);
self::assertSame(10, json_decode((string) $response->getContent(), true)['perPage']);
}
public function testDefaultPerPageIs10(): void
{
$repo = $this->spyRepository();
$response = $this->provideWith($repo, []);
self::assertSame(10, $repo->findArgs['limit']);
self::assertSame(10, json_decode((string) $response->getContent(), true)['perPage']);
}
private function spyRepository(array $items = [], int $count = 0): AuditLogReadRepositoryInterface