From d94865336a4ed247dd27464cf60c5ea3f7fb615b Mon Sep 17 00:00:00 2001 From: Ana Rute Mendes Date: Wed, 27 Sep 2023 15:41:26 +0200 Subject: [PATCH] Send a valid payload in test It started failing in a new PHP version, as the endpoint expects a XML object to parse. Send a payload without session to check that the user is not logged in. --- tests/integration/TaskServiceTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/TaskServiceTest.php b/tests/integration/TaskServiceTest.php index f2d6e5a63..51dd554d2 100644 --- a/tests/integration/TaskServiceTest.php +++ b/tests/integration/TaskServiceTest.php @@ -12,7 +12,11 @@ public function setUp(): void public function testCreateTaskFailsWithUserLoggedOut(): void { - $res = $this->makeRequest('web/services/createTasksService.php', null, 'POST', ''); + $request = ''; + $request .= ''; // send an empty session + $request .= '2023-03-2400:0003:00'; + $request .= '11'; + $res = $this->makeRequest('web/services/createTasksService.php', null, 'POST', $request); $this->assertEquals('You must be logged in', $res->error); }