feat: proper determination of agency initiated bookings
For booking that are agency initiated (groups) different rules apply concerning mutability and requirement of personal data and whether the first participant is the applicant or not. This commit adds logic to evaluate the agency id assigned to the booking data to decide.
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Tests\Service;
|
||||
use App\BusProNet\Constants;
|
||||
use App\BusProNet\Model\Room;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use App\BusProNet\XmlLoader\AgencyLoader;
|
||||
use App\Exception\NoRoomsAvailableException;
|
||||
use App\Service\BookingPriceCalculatorService;
|
||||
use App\Service\BookingService;
|
||||
@@ -27,11 +28,14 @@ class BookingServiceStatusTest extends TestCase
|
||||
$this->travelDataService = $this->createMock(TravelDataService::class);
|
||||
$priceCalculator = $this->createMock(BookingPriceCalculatorService::class);
|
||||
$participantEligibility = $this->createMock(ParticipantEligibilityService::class);
|
||||
$agencyLoader = $this->createMock(AgencyLoader::class);
|
||||
|
||||
$this->bookingService = new BookingService(
|
||||
$this->travelDataService,
|
||||
$priceCalculator,
|
||||
$participantEligibility
|
||||
$participantEligibility,
|
||||
$agencyLoader,
|
||||
'F' // default booking status
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user