agent foundation

This commit is contained in:
2026-03-06 00:44:52 +01:00
parent 9819cba733
commit 9a08f96c11
199 changed files with 8522 additions and 1880 deletions

View File

@@ -2,6 +2,7 @@
namespace MintyPHP\Tests\Service\Audit;
use MintyPHP\Http\RequestRuntime;
use MintyPHP\Http\RequestContext;
use MintyPHP\Repository\Audit\ApiAuditLogRepositoryInterface;
use MintyPHP\Service\Audit\ApiAuditService;
@@ -28,7 +29,10 @@ class ApiAuditServiceTest extends TestCase
public function testCurrentRequestIdIsNullBeforeStart(): void
{
$service = new ApiAuditService($this->createMock(ApiAuditLogRepositoryInterface::class));
$service = new ApiAuditService(
$this->createMock(ApiAuditLogRepositoryInterface::class),
new RequestRuntime()
);
$this->assertNull($service->currentRequestId());
}
@@ -38,7 +42,10 @@ class ApiAuditServiceTest extends TestCase
$_SERVER['REQUEST_URI'] = '/api/v1/me?x=1';
$_GET = ['x' => '1'];
$service = new ApiAuditService($this->createMock(ApiAuditLogRepositoryInterface::class));
$service = new ApiAuditService(
$this->createMock(ApiAuditLogRepositoryInterface::class),
new RequestRuntime()
);
$service->startRequestContext();
$requestId = $service->currentRequestId();
@@ -58,7 +65,10 @@ class ApiAuditServiceTest extends TestCase
$_SERVER['REQUEST_URI'] = '/api/v1/me';
$_GET = [];
$service = new ApiAuditService($this->createMock(ApiAuditLogRepositoryInterface::class));
$service = new ApiAuditService(
$this->createMock(ApiAuditLogRepositoryInterface::class),
new RequestRuntime()
);
$service->startRequestContext();
$this->assertNull($service->currentRequestId());