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