add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -18,7 +18,6 @@ class ApiClientCompatibilityVersioningContractTest extends FullSurfaceE2EContrac
$uri = $route->uri();
if (str_starts_with($uri, 'api/v1/')) {
$this->assertTrue(true);
continue;
}
@@ -32,7 +31,7 @@ class ApiClientCompatibilityVersioningContractTest extends FullSurfaceE2EContrac
$this->assertTrue(
$isAllowed,
$uri.' is an unversioned API route. If this is deliberate legacy support, add it to the explicit allow-list.'
$uri . ' is an unversioned API route. If this is deliberate legacy support, add it to the explicit allow-list.'
);
}
}
@@ -46,8 +45,8 @@ class ApiClientCompatibilityVersioningContractTest extends FullSurfaceE2EContrac
continue;
}
$key = $name.'|'.$this->primaryMethod($route);
$this->assertArrayNotHasKey($key, $seen, 'Duplicate API route name/method pair: '.$key.' for '.$route->uri().' and '.($seen[$key] ?? 'unknown'));
$key = $name . '|' . $this->primaryMethod($route);
$this->assertArrayNotHasKey($key, $seen, 'Duplicate API route name/method pair: ' . $key . ' for ' . $route->uri() . ' and ' . ($seen[$key] ?? 'unknown'));
$seen[$key] = $route->uri();
}
}
@@ -63,10 +62,10 @@ class ApiClientCompatibilityVersioningContractTest extends FullSurfaceE2EContrac
$legacyResponse = $this->postJson($legacy, ['email' => 'bad@example.test', 'password' => 'wrong']);
$currentResponse = $this->postJson($current, ['email' => 'bad@example.test', 'password' => 'wrong']);
$this->assertNoServerError($legacyResponse, $legacy.' legacy auth failure');
$this->assertNoServerError($currentResponse, $current.' current auth failure');
$this->assertStatusIn($legacyResponse, [400, 401, 403, 419, 422], $legacy.' legacy auth failure');
$this->assertStatusIn($currentResponse, [400, 401, 403, 419, 422], $current.' current auth failure');
$this->assertNoServerError($legacyResponse, $legacy . ' legacy auth failure');
$this->assertNoServerError($currentResponse, $current . ' current auth failure');
$this->assertStatusIn($legacyResponse, [400, 401, 403, 419, 422], $legacy . ' legacy auth failure');
$this->assertStatusIn($currentResponse, [400, 401, 403, 419, 422], $current . ' current auth failure');
}
}
}