Fix Pint formatting
This commit is contained in:
+7
-7
@@ -15,8 +15,8 @@ class ApiDeepIdempotencyAndDuplicateSubmissionContractTest extends FullSurfaceE2
|
||||
$method = $this->primaryMethod($route);
|
||||
$uri = $route->uri();
|
||||
$payload = $this->payloadFor($method, $uri) + [
|
||||
'external_reference' => 'E2E-DUP-' . md5($uri),
|
||||
'idempotency_key' => 'E2E-DUP-' . md5($uri),
|
||||
'external_reference' => 'E2E-DUP-'.md5($uri),
|
||||
'idempotency_key' => 'E2E-DUP-'.md5($uri),
|
||||
];
|
||||
|
||||
$first = $this->requestAs($this->actorFor($uri), $method, $uri, $payload);
|
||||
@@ -26,16 +26,16 @@ class ApiDeepIdempotencyAndDuplicateSubmissionContractTest extends FullSurfaceE2
|
||||
$status = $response->getStatusCode();
|
||||
|
||||
if ($status >= 500) {
|
||||
$failures[] = "$method $uri $label duplicate request crashed with $status: " . $response->getContent();
|
||||
$failures[] = "$method $uri $label duplicate request crashed with $status: ".$response->getContent();
|
||||
}
|
||||
|
||||
if (! in_array($status, [200, 201, 202, 204, 302, 400, 401, 403, 404, 405, 409, 419, 422], true)) {
|
||||
$failures[] = "$method $uri $label duplicate request returned unexpected $status: " . $response->getContent();
|
||||
$failures[] = "$method $uri $label duplicate request returned unexpected $status: ".$response->getContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertSame([], $failures, "Duplicate submissions need controlled behavior, because users double-click like it's a sport:\n" . implode("\n", $failures));
|
||||
$this->assertSame([], $failures, "Duplicate submissions need controlled behavior, because users double-click like it's a sport:\n".implode("\n", $failures));
|
||||
}
|
||||
|
||||
public function test_repeat_delete_or_archive_requests_are_safe_to_retry_or_fail_cleanly(): void
|
||||
@@ -49,12 +49,12 @@ class ApiDeepIdempotencyAndDuplicateSubmissionContractTest extends FullSurfaceE2
|
||||
|
||||
foreach (['first' => $first, 'second' => $second] as $label => $response) {
|
||||
if ($response->getStatusCode() >= 500) {
|
||||
$failures[] = "DELETE $uri $label retry crashed: " . $response->getContent();
|
||||
$failures[] = "DELETE $uri $label retry crashed: ".$response->getContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertSame([], $failures, "Retrying destructive operations must not crash:\n" . implode("\n", $failures));
|
||||
$this->assertSame([], $failures, "Retrying destructive operations must not crash:\n".implode("\n", $failures));
|
||||
}
|
||||
|
||||
/** @return list<LaravelRoute> */
|
||||
|
||||
Reference in New Issue
Block a user