chore: adjust and cleanup tests
This commit is contained in:
@@ -28,7 +28,7 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
// Create test room
|
||||
$room = new Room();
|
||||
$room->id = 1;
|
||||
$room->name = 'Doppelzimmer';
|
||||
$room->label = 'Doppelzimmer';
|
||||
$room->price = 100.0;
|
||||
|
||||
$travel = new Travel();
|
||||
@@ -98,7 +98,7 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
|
||||
$result = $this->service->getCardData($bookingDto, 0);
|
||||
|
||||
$this->assertEquals('Teilnehmer 1', $result['name']);
|
||||
$this->assertEquals('Anmelder:in', $result['name']);
|
||||
}
|
||||
|
||||
public function testGetCardDataWithEmptyName(): void
|
||||
@@ -120,7 +120,7 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
|
||||
$result = $this->service->getCardData($bookingDto, 0);
|
||||
|
||||
$this->assertEquals('Teilnehmer 1', $result['name']);
|
||||
$this->assertEquals('Anmelder:in', $result['name']);
|
||||
}
|
||||
|
||||
public function testGetCardDataWithNoRoomAssignment(): void
|
||||
@@ -205,11 +205,11 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
// Create test rooms
|
||||
$room1 = new Room();
|
||||
$room1->id = 1;
|
||||
$room1->name = 'Einzelzimmer';
|
||||
$room1->label = 'Einzelzimmer';
|
||||
|
||||
$room2 = new Room();
|
||||
$room2->id = 2;
|
||||
$room2->name = 'Doppelzimmer';
|
||||
$room2->label = 'Doppelzimmer';
|
||||
|
||||
$travel = new Travel();
|
||||
$travel->rooms = [$room1, $room2];
|
||||
@@ -255,7 +255,7 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
$this->assertEquals('500,00 €', $result[1]['price']);
|
||||
|
||||
// Third participant (no name)
|
||||
$this->assertEquals('Teilnehmer 3', $result[2]['name']);
|
||||
$this->assertEquals('Teilnehmer:in 2', $result[2]['name']);
|
||||
$this->assertEquals('Doppelzimmer', $result[2]['roomName']);
|
||||
$this->assertEquals('480,00 €', $result[2]['price']);
|
||||
}
|
||||
@@ -312,8 +312,8 @@ class ParticipantCardDataServiceTest extends TestCase
|
||||
$result2 = $this->service->getCardData($bookingDto, 1);
|
||||
$result3 = $this->service->getCardData($bookingDto, 2);
|
||||
|
||||
$this->assertEquals('Teilnehmer 1', $result1['name']);
|
||||
$this->assertEquals('Teilnehmer 2', $result2['name']);
|
||||
$this->assertEquals('Teilnehmer 3', $result3['name']);
|
||||
$this->assertEquals('Anmelder:in', $result1['name']);
|
||||
$this->assertEquals('Teilnehmer:in 1', $result2['name']);
|
||||
$this->assertEquals('Teilnehmer:in 2', $result3['name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user