diff --git a/webapp/tests/Unit/Controller/API/ClarificationControllerTest.php b/webapp/tests/Unit/Controller/API/ClarificationControllerTest.php index a71ed36965..cb02f0099b 100644 --- a/webapp/tests/Unit/Controller/API/ClarificationControllerTest.php +++ b/webapp/tests/Unit/Controller/API/ClarificationControllerTest.php @@ -143,7 +143,7 @@ public function testAddInvalidData(string $user, array $dataToSend, string $expe public function provideAddInvalidData(): Generator { yield ['demo', [], ""]; - yield ['demo', ['invalidfield' => 'value'], "/text:\n.*This value should be of type unknown./"]; + yield ['demo', ['invalidfield' => 'value'], "/text:\n.*This value should be of type string./"]; yield ['demo', ['text' => 'This is a clarification', 'from_team_id' => 'domjudge'], "Can not create a clarification from a different team."]; yield ['demo', ['text' => 'This is a clarification', 'to_team_id' => 'exteam'], "Can not create a clarification that is sent to a team."]; yield ['demo', ['text' => 'This is a clarification', 'problem_id' => 'prob'], "Problem 'prob' not found."]; diff --git a/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php b/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php index 3acc00496a..5655e97c80 100644 --- a/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php +++ b/webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php @@ -274,7 +274,7 @@ public function provideChangeTimes(): Generator // General tests yield [[], 400, '']; - yield [['dummy' => 'dummy'], 400, "This value should be of type unknown."]; + yield [['dummy' => 'dummy'], 400, "This value should be of type string."]; yield [['id' => 1], 400, 'Missing \"start_time\" or \"scoreboard_thaw_time\" in request.']; yield [['id' => 1, 'start_time' => null, 'scoreboard_thaw_time' => date('Y-m-d\TH:i:s', strtotime('+15 seconds'))], 400, 'Setting both \"start_time\" and \"scoreboard_thaw_time\" at the same time is not allowed.']; diff --git a/webapp/tests/Unit/Controller/API/SubmissionControllerTest.php b/webapp/tests/Unit/Controller/API/SubmissionControllerTest.php index 8d3f3c53c8..c255ff498c 100644 --- a/webapp/tests/Unit/Controller/API/SubmissionControllerTest.php +++ b/webapp/tests/Unit/Controller/API/SubmissionControllerTest.php @@ -107,7 +107,7 @@ public function provideAddInvalidData(): Generator yield ['demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'id' => '123'], "A team can not assign id."]; yield ['demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'time' => '2021-01-01T00:00:00'], "A team can not assign time."]; yield ['demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'files' => []], "No files specified."]; - yield ['demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'files' => [['invalidkey' => 'somevalue']]], "/files\[0\].data:\n.*This value should be of type unknown./"]; + yield ['demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'files' => [['invalidkey' => 'somevalue']]], "/files\[0\].data:\n.*This value should be of type string./"]; yield [ 'demo', ['problem_id' => 'hello', 'language_id' => 'cpp', 'files' => 'this is not an array'], diff --git a/webapp/tests/Unit/Controller/API/UserControllerTest.php b/webapp/tests/Unit/Controller/API/UserControllerTest.php index 33629e5c4e..fc92392a2e 100644 --- a/webapp/tests/Unit/Controller/API/UserControllerTest.php +++ b/webapp/tests/Unit/Controller/API/UserControllerTest.php @@ -91,6 +91,6 @@ public function testUpdateNoId(): void ]; $response = $this->verifyApiJsonResponse('PUT', $this->helperGetEndpointURL($this->apiEndpoint) . '/someid', 400, 'admin', $data); - static::assertMatchesRegularExpression('/id:\n.*This value should be of type unknown./', $response['message']); + static::assertMatchesRegularExpression('/id:\n.*This value should be of type string./', $response['message']); } }