feat: upgrade phpunit to 12.5
This commit is contained in:
@@ -86,9 +86,9 @@ class ParticipantControllerTest extends TestCase
|
||||
->with($user, 42, $bookingDto);
|
||||
|
||||
$prepopulationService = new ParticipantDataPrefiller(
|
||||
$this->createMock(ApiClient::class),
|
||||
$this->createMock(Crypt::class),
|
||||
$this->createMock(LoggerInterface::class),
|
||||
$this->createStub(ApiClient::class),
|
||||
$this->createStub(Crypt::class),
|
||||
$this->createStub(LoggerInterface::class),
|
||||
);
|
||||
|
||||
$participantFormSupportService = $this->createMock(ParticipantFormSupport::class);
|
||||
@@ -115,7 +115,7 @@ class ParticipantControllerTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$summaryData = $this->createMock(BookingSummaryDto::class);
|
||||
$summaryData = $this->createStub(BookingSummaryDto::class);
|
||||
$context = new BookingEditContext($bookingDto, $bookingData, null, $summaryData);
|
||||
|
||||
$contextFactory = $this->createMock(BookingEditContextFactory::class);
|
||||
@@ -131,7 +131,7 @@ class ParticipantControllerTest extends TestCase
|
||||
$dataLoader,
|
||||
$draftService,
|
||||
$contextFactory,
|
||||
$this->createMock(BookingConfigurator::class),
|
||||
$this->createStub(BookingConfigurator::class),
|
||||
$bookingSessionService,
|
||||
$prepopulationService,
|
||||
$participantFormSupportService,
|
||||
@@ -217,7 +217,7 @@ class ParticipantControllerTest extends TestCase
|
||||
->with($bookingDto)
|
||||
->willReturn([]);
|
||||
|
||||
$summaryData = $this->createMock(BookingSummaryDto::class);
|
||||
$summaryData = $this->createStub(BookingSummaryDto::class);
|
||||
$context = new BookingEditContext($bookingDto, $bookingData, null, $summaryData);
|
||||
|
||||
$contextFactory = $this->createMock(BookingEditContextFactory::class);
|
||||
@@ -230,14 +230,14 @@ class ParticipantControllerTest extends TestCase
|
||||
->willReturn($context);
|
||||
|
||||
$prepopulationService = new ParticipantDataPrefiller(
|
||||
$this->createMock(ApiClient::class),
|
||||
$this->createMock(Crypt::class),
|
||||
$this->createMock(LoggerInterface::class),
|
||||
$this->createStub(ApiClient::class),
|
||||
$this->createStub(Crypt::class),
|
||||
$this->createStub(LoggerInterface::class),
|
||||
);
|
||||
|
||||
$controller = new TestableParticipantController(
|
||||
$dataLoader,
|
||||
$this->createMock(BookingEditDraftManager::class),
|
||||
$this->createStub(BookingEditDraftManager::class),
|
||||
$contextFactory,
|
||||
$bookingConfigurator,
|
||||
$bookingSessionService,
|
||||
@@ -286,17 +286,17 @@ class ParticipantControllerTest extends TestCase
|
||||
$bookingDto->originalFingerprint = $changeTracker->generateFingerprint($bookingDto);
|
||||
$this->assertFalse($changeTracker->isDirty($bookingDto), 'Baseline must start clean');
|
||||
|
||||
$form = $this->createMock(FormInterface::class);
|
||||
$form = $this->createStub(FormInterface::class);
|
||||
$form->method('handleRequest')->willReturnSelf();
|
||||
$form->method('createView')->willReturn(new FormView());
|
||||
|
||||
$dataLoader = $this->createMock(BookingEditDataLoader::class);
|
||||
$dataLoader = $this->createStub(BookingEditDataLoader::class);
|
||||
$dataLoader->method('fetchBookingData')->willReturn($bookingData);
|
||||
|
||||
$bookingSessionService = $this->createMock(BookingSessionManager::class);
|
||||
$bookingSessionService = $this->createStub(BookingSessionManager::class);
|
||||
$bookingSessionService->method('getBookingDto')->willReturn($bookingDto);
|
||||
|
||||
$participantFormSupportService = $this->createMock(ParticipantFormSupport::class);
|
||||
$participantFormSupportService = $this->createStub(ParticipantFormSupport::class);
|
||||
$participantFormSupportService->method('ensureParticipantExists')->willReturn($participant);
|
||||
$participantFormSupportService->method('createParticipantEditDto')
|
||||
->willReturn(new ParticipantEditDto($participant, $bookingDto));
|
||||
@@ -306,21 +306,21 @@ class ParticipantControllerTest extends TestCase
|
||||
]);
|
||||
$participantFormSupportService->method('collectAndClearNotifications')->willReturn([]);
|
||||
|
||||
$summaryData = $this->createMock(BookingSummaryDto::class);
|
||||
$contextFactory = $this->createMock(BookingEditContextFactory::class);
|
||||
$summaryData = $this->createStub(BookingSummaryDto::class);
|
||||
$contextFactory = $this->createStub(BookingEditContextFactory::class);
|
||||
$contextFactory->method('createParticipantContext')
|
||||
->willReturn(new BookingEditContext($bookingDto, $bookingData, null, $summaryData));
|
||||
|
||||
$controller = new TestableParticipantController(
|
||||
$dataLoader,
|
||||
$this->createMock(BookingEditDraftManager::class),
|
||||
$this->createStub(BookingEditDraftManager::class),
|
||||
$contextFactory,
|
||||
$this->createMock(BookingConfigurator::class),
|
||||
$this->createStub(BookingConfigurator::class),
|
||||
$bookingSessionService,
|
||||
new ParticipantDataPrefiller(
|
||||
$this->createMock(ApiClient::class),
|
||||
$this->createMock(Crypt::class),
|
||||
$this->createMock(LoggerInterface::class),
|
||||
$this->createStub(ApiClient::class),
|
||||
$this->createStub(Crypt::class),
|
||||
$this->createStub(LoggerInterface::class),
|
||||
),
|
||||
$participantFormSupportService,
|
||||
$user,
|
||||
|
||||
Reference in New Issue
Block a user