Skip to content

Commit

Permalink
fix(ZMS-3253): fix zmsadmin availabilities conflict test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Fink authored and Tom Fink committed Nov 15, 2024
1 parent acb62ac commit a16b2e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
13 changes: 1 addition & 12 deletions zmsadmin/src/Zmsadmin/AvailabilityConflicts.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function readResponse(
) {
$validator = $request->getAttribute('validator');
$input = $validator->getInput()->isJson()->assertValid()->getValue();
error_log('$input :' . json_encode($input));
$data = static::getAvailabilityData($input);
return \BO\Slim\Render::withJson(
$response,
Expand All @@ -49,15 +48,7 @@ protected static function getAvailabilityData($input)
$selectedAvailability->getEndDateTime() : $selectedDateTime;

$availabilityList = $availabilityList->sortByCustomStringKey('endTime');

$selectedAvailability->getEndDateTime();


$startDate = new \DateTimeImmutable('now');
$endDate = (new \DateTimeImmutable('now'))->modify('+1 month');


$conflictList = $availabilityList->getConflicts($startDate, $endDate);
$conflictList = $availabilityList->getConflicts($startDateTime, $endDateTime);

foreach ($conflictList as $conflict) {
$availabilityId = ($conflict->getFirstAppointment()->getAvailability()->getId()) ?
Expand All @@ -68,8 +59,6 @@ protected static function getAvailabilityData($input)
}
}

error_log(json_encode($conflictedList));

return [
'conflictList' => $conflictList->toConflictListByDay(),
'conflictIdList' => (count($conflictedList)) ? $conflictedList : []
Expand Down
3 changes: 0 additions & 3 deletions zmsadmin/tests/Zmsadmin/AvailabilityConflictsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1872,9 +1872,6 @@ public function testRendering()
}
}'
], [], 'POST');
error_log("***");
error_log((string)$response->getBody());
error_log("***");
$this->assertStringContainsString('Zwei \u00d6ffnungszeiten sind gleich', (string)$response->getBody());
$this->assertStringContainsString('2016-04-04', (string)$response->getBody());
$this->assertStringContainsString('2016-04-11', (string)$response->getBody());
Expand Down

0 comments on commit a16b2e4

Please sign in to comment.