Skip to content

Commit

Permalink
feat(ZMS-3460): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manjencic committed Jan 23, 2025
1 parent 0e22c1b commit 05e5192
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ public function getAvailableDaysList(array $queryParams): AvailableDays|array

private function extractClientData(array $queryParams): object
{
$queryParams['officeId'] = $queryParams['officeId'] ? (string) $queryParams['officeId'] ? : '';
$queryParams['serviceId'] = $queryParams['serviceId'] ? (string) $queryParams['serviceId'] : '';
$serviceCount = $queryParams['serviceCount'] ?? '';
$serviceCounts = !empty($serviceCount)
? array_map('trim', explode(',', (string) $serviceCount))
: [];

return (object) [
'officeIds' => array_map('trim', explode(',', (string) $queryParams['officeId'] ?? '')),
'serviceIds' => array_map('trim', explode(',', (string) $queryParams['serviceId'] ?? '')),
'officeIds' => array_map('trim', explode(',', $queryParams['officeId'])),
'serviceIds' => array_map('trim', explode(',', $queryParams['serviceId'])),
'serviceCounts' => $serviceCounts,
'startDate' => $queryParams['startDate'] ?? null,
'endDate' => $queryParams['endDate'] ?? null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private function createMockFacade(AvailableAppointments $returnValue): void
class ZmsApiFacadeService {
public static function getAvailableAppointments(
?string $date,
?int $officeId,
?array $officeIds,
?array $serviceIds,
?array $serviceCounts
): \BO\Zmscitizenapi\Models\AvailableAppointments|array {
Expand Down

0 comments on commit 05e5192

Please sign in to comment.