feat: upgrade phpunit to 12.5

This commit is contained in:
Björn Fromme
2026-08-31 09:31:00 +02:00
parent 010cfe56b2
commit bfad61f1dd
95 changed files with 1436 additions and 1224 deletions
+12 -33
View File
@@ -11,6 +11,7 @@ use App\Form\Model\BookingDto;
use App\Form\Model\ParticipantDto;
use App\Form\Model\RoomSelectionDto;
use App\Service\RoomAssigner;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
/**
@@ -25,9 +26,7 @@ class RoomAssignerTest extends TestCase
$this->service = new RoomAssigner();
}
/**
* @test
*/
#[Test]
public function shouldAutoAssignRoomsReturnsTrueForSingleRoomType(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -39,9 +38,7 @@ class RoomAssignerTest extends TestCase
self::assertTrue($result, 'Should auto-assign when exactly one room type is selected');
}
/**
* @test
*/
#[Test]
public function shouldAutoAssignRoomsReturnsFalseForMultipleRoomTypes(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -54,9 +51,7 @@ class RoomAssignerTest extends TestCase
self::assertFalse($result, 'Should not auto-assign when multiple room types are selected');
}
/**
* @test
*/
#[Test]
public function shouldAutoAssignRoomsReturnsFalseForNoRoomSelections(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([]);
@@ -66,9 +61,7 @@ class RoomAssignerTest extends TestCase
self::assertFalse($result, 'Should not auto-assign when no rooms are selected');
}
/**
* @test
*/
#[Test]
public function shouldAutoAssignRoomsIgnoresZeroQuantityRooms(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -82,9 +75,7 @@ class RoomAssignerTest extends TestCase
self::assertTrue($result, 'Should treat zero/null quantity as not selected');
}
/**
* @test
*/
#[Test]
public function assignParticipantsToRoomsWorksWithSingleRoomType(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -117,9 +108,7 @@ class RoomAssignerTest extends TestCase
self::assertSame(100, $bookingDto->participants[3]->assignedRoomId);
}
/**
* @test
*/
#[Test]
public function assignParticipantsToRoomsSkipsAssignmentWithMultipleRoomTypes(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -159,9 +148,7 @@ class RoomAssignerTest extends TestCase
self::assertNull($bookingDto->participants[3]->assignedRoomId);
}
/**
* @test
*/
#[Test]
public function assignParticipantsToRoomsHandlesMixedRoomCapacities(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -190,9 +177,7 @@ class RoomAssignerTest extends TestCase
self::assertSame(100, $bookingDto->participants[1]->assignedRoomId);
}
/**
* @test
*/
#[Test]
public function validateAndResetInvalidAssignmentsResetsOrphanedAssignments(): void
{
// Create DTO with only room 100 selected
@@ -221,9 +206,7 @@ class RoomAssignerTest extends TestCase
self::assertNull($bookingDto->participants[3]->assignedRoomId, 'Invalid assignment should be reset to null');
}
/**
* @test
*/
#[Test]
public function validateAndResetInvalidAssignmentsReturnsFalseWhenAllValid(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -245,9 +228,7 @@ class RoomAssignerTest extends TestCase
self::assertSame(100, $bookingDto->participants[1]->assignedRoomId);
}
/**
* @test
*/
#[Test]
public function validateAndResetInvalidAssignmentsHandlesNullAssignments(): void
{
$bookingDto = $this->createBookingDtoWithRoomSelections([
@@ -267,9 +248,7 @@ class RoomAssignerTest extends TestCase
self::assertFalse($result, 'Should return false when only null assignments exist');
}
/**
* @test
*/
#[Test]
public function validateAndResetInvalidAssignmentsHandlesEmptySelectedRooms(): void
{
// All rooms have quantity 0 (none selected)