wip: bulk insurance refactoring
This commit is contained in:
@@ -17,6 +17,7 @@ use App\BusProNet\Model\Travel;
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Service\InsuranceMatchingService;
|
||||
use App\Service\InsuranceTypeFilterService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,12 @@ class BookingDataProcessorTest extends TestCase
|
||||
// Create a mock InsuranceMatchingService
|
||||
$insuranceMatchingService = $this->createMock(InsuranceMatchingService::class);
|
||||
|
||||
$this->processor = new BookingDataProcessor($insuranceMatchingService);
|
||||
// Create a mock InsuranceTypeFilterService that simply returns the input
|
||||
$insuranceTypeFilterService = $this->createMock(InsuranceTypeFilterService::class);
|
||||
$insuranceTypeFilterService->method('filterNonComplementary')
|
||||
->willReturnArgument(0);
|
||||
|
||||
$this->processor = new BookingDataProcessor($insuranceMatchingService, $insuranceTypeFilterService);
|
||||
}
|
||||
|
||||
public function testCreateUpdateRequestPayloadWithCompleteData(): void
|
||||
|
||||
@@ -10,6 +10,7 @@ use App\Form\Model\BookingDto;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Form\Service\ParticipantInsuranceFieldHandler;
|
||||
use App\Service\InsuranceMatchingService;
|
||||
use App\Service\InsuranceTypeFilterService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ParticipantInsuranceFieldHandlerTest extends TestCase
|
||||
@@ -20,7 +21,12 @@ class ParticipantInsuranceFieldHandlerTest extends TestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->insuranceMatchingService = $this->createMock(InsuranceMatchingService::class);
|
||||
$this->handler = new ParticipantInsuranceFieldHandler($this->insuranceMatchingService);
|
||||
|
||||
$insuranceTypeFilterService = $this->createMock(InsuranceTypeFilterService::class);
|
||||
$insuranceTypeFilterService->method('filterNonComplementary')
|
||||
->willReturnArgument(0);
|
||||
|
||||
$this->handler = new ParticipantInsuranceFieldHandler($this->insuranceMatchingService, $insuranceTypeFilterService);
|
||||
}
|
||||
|
||||
public function testGetFieldName(): void
|
||||
|
||||
Reference in New Issue
Block a user