test(audit) : utilise createStub pour une sortie PHPUnit propre

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 10:37:12 +02:00
parent 48ee173461
commit 8c1cd6704e
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ final class AuditLogProviderTest extends TestCase
->setDeviceId('device-abc')
;
$repo = $this->createMock(AuditLogReadRepositoryInterface::class);
$repo = $this->createStub(AuditLogReadRepositoryInterface::class);
$repo->method('countByFilters')->willReturn(1);
$repo->method('findByFilters')->willReturn([$log]);
@@ -38,7 +38,7 @@ final class AuditLogProviderTest extends TestCase
$stack->push(Request::create('/api/audit-logs', 'GET'));
$provider = new AuditLogProvider($stack, $repo);
$response = $provider->provide($this->createMock(Operation::class));
$response = $provider->provide($this->createStub(Operation::class));
$data = json_decode((string) $response->getContent(), true);
$item = $data['items'][0];