apiRoutesContainingAny(['create', 'store', 'send', 'dispatch', 'notify', 'payment', 'attendance', 'import', 'export']); foreach (array_slice($routes, 0, 35) as $route) { $method = $this->primaryMethod($route); $uri = $route->uri(); foreach ([$this->admin, $this->parent] as $actor) { $response = $this->withHeaders([ 'Idempotency-Key' => 'batch16-shared-retry-key', 'X-Client-Operation-Id' => 'batch16-shared-operation', 'X-Retry-Attempt' => '2', ])->requestAs($actor, $method, $uri, $this->payloadFor($method, $uri) + [ 'client_operation_id' => 'batch16-shared-operation', 'retry_of' => 'batch16-original-operation', ]); $this->assertControlled($response, $method, $uri); $this->assertStringNotContainsString('duplicate key value violates unique constraint', strtolower($response->getContent())); } } } }