fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -10,7 +10,7 @@ class ApiQueryParameterFuzzingContractTest extends FullSurfaceE2EContractCase
{
foreach ($this->collectionPaths() as $path) {
foreach ($this->hostileQueries() as $query) {
$response = $this->requestAs($this->actorFor($path), 'GET', $path . '?' . http_build_query($query));
$response = $this->requestAs($this->actorFor($path), 'GET', $path.'?'.http_build_query($query));
$this->assertStatusIn($response, [200, 204, 302, 400, 401, 403, 404, 405, 409, 419, 422], "hostile query $path");
$this->assertNoServerError($response, "hostile query $path");
@@ -22,7 +22,7 @@ class ApiQueryParameterFuzzingContractTest extends FullSurfaceE2EContractCase
{
foreach ($this->dateRangePaths() as $path) {
foreach ($this->badDateRanges() as $query) {
$response = $this->requestAs($this->actorFor($path), 'GET', $path . '?' . http_build_query($query));
$response = $this->requestAs($this->actorFor($path), 'GET', $path.'?'.http_build_query($query));
$this->assertStatusIn($response, [200, 204, 302, 400, 401, 403, 404, 405, 409, 419, 422], "bad date range $path");
$this->assertNoServerError($response, "bad date range $path");
@@ -33,7 +33,7 @@ class ApiQueryParameterFuzzingContractTest extends FullSurfaceE2EContractCase
public function test_sorting_contract_does_not_allow_raw_sql_fragments(): void
{
foreach ($this->collectionPaths() as $path) {
$response = $this->requestAs($this->actorFor($path), 'GET', $path . '?' . http_build_query([
$response = $this->requestAs($this->actorFor($path), 'GET', $path.'?'.http_build_query([
'sort' => 'id desc; drop table users; --',
'direction' => 'sideways',
]));