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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user