add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature\Api\V1\FullSurface;
use Tests\Feature\Api\V1\FullSurface\Support\FullSurfaceE2EContractCase;
class ApiBatch15AdminImpersonationSessionBoundaryContractTest extends FullSurfaceE2EContractCase
{
public function test_batch15_impersonation_and_acting_as_routes_require_real_admin_context_not_payload_claims(): void
{
$routes = $this->apiRoutesContainingAny(['impersonate', 'acting-as', 'act-as', 'switch-user', 'delegate', 'behalf']);
foreach (array_slice($routes, 0, 30) as $route) {
$method = $this->primaryMethod($route);
$uri = $route->uri();
$payload = $this->payloadFor($method, $uri) + [
'impersonator_id' => $this->admin->id,
'target_user_id' => $this->admin->id,
'acting_as' => 'administrator',
'reason' => 'Batch 15 impersonation boundary probe',
'approved_by' => $this->admin->id,
'expires_at' => '2099-01-01',
];
$parentResponse = $this->requestAs($this->parent, $method, $uri, $payload);
$this->assertControlled($parentResponse, $method, $uri);
$this->assertStringNotContainsString('access_token', strtolower($parentResponse->getContent()));
}
}
}