get('/api/v1/working-days/CZ/2024-01-15'); // Mon $response->assertStatus(200); $response->assertJson( [ 'date' => '2024-01-15', 'isWorkingDay' => true, ] ); } public function testWorkingDayWillReturnSuccessResponseAndFalseIfWeekendDayGiven(): void { $response = $this->get('/api/v1/working-days/CZ/2024-01-07'); // San $response->assertStatus(200); $response->assertJson( [ 'date' => '2024-01-07', 'isWorkingDay' => false, ] ); } public function testWorkingDayWillReturnErrorResponseIfInvalidCountryCodeGiven(): void { $response = $this->get('/api/v1/working-days/XX/2024-01-01'); // Invalid country code $response->assertStatus(400); $response->assertJsonStructure( [ 'errors' => ['countryCode'] ] ); } public function testWorkingDayWillReturnErrorResponseIfInvalidDateFormatGiven(): void { $response = $this->get('/api/v1/working-days/CZ/invalid-date'); // Invalid date format $response->assertStatus(400); $response->assertJsonStructure( [ 'errors' => ['date'] ] ); } }