feat: consolidated insurance service
This commit is contained in:
@@ -16,8 +16,8 @@ use App\BusProNet\Model\Service;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Service\InsuranceMatchingService;
|
||||
use App\Service\InsuranceTypeFilterService;
|
||||
use App\Service\BookingPriceCalculatorService;
|
||||
use App\Service\InsuranceService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -32,15 +32,19 @@ class BookingDataProcessorTest extends TestCase
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
// Create a mock InsuranceMatchingService
|
||||
$insuranceMatchingService = $this->createMock(InsuranceMatchingService::class);
|
||||
// Create a mock InsuranceService
|
||||
$insuranceService = $this->createMock(InsuranceService::class);
|
||||
$priceCalculatorService = $this->createMock(BookingPriceCalculatorService::class);
|
||||
|
||||
// Create a mock InsuranceTypeFilterService that simply returns the input
|
||||
$insuranceTypeFilterService = $this->createMock(InsuranceTypeFilterService::class);
|
||||
$insuranceTypeFilterService->method('filterNonComplementary')
|
||||
->willReturnArgument(0);
|
||||
// Mock getSelectableInsurances to return empty array (not used in these tests)
|
||||
$insuranceService->method('getSelectableInsurances')
|
||||
->willReturn([]);
|
||||
|
||||
$this->processor = new BookingDataProcessor($insuranceMatchingService, $insuranceTypeFilterService);
|
||||
// Mock price calculator to return default prices (not used in most tests)
|
||||
$priceCalculatorService->method('calculateIndividualParticipantPriceExcludingInsurance')
|
||||
->willReturn(500.0);
|
||||
|
||||
$this->processor = new BookingDataProcessor($insuranceService, $priceCalculatorService);
|
||||
}
|
||||
|
||||
public function testCreateUpdateRequestPayloadWithCompleteData(): void
|
||||
|
||||
Reference in New Issue
Block a user