formatter = new ServiceLabelFormatter(); } public function testFormatServiceLabelReturnsLabelWithoutPrice(): void { $service = new Service(); $service->label = 'Skipass'; $service->price = null; $this->assertSame('Skipass', $this->formatter->formatServiceLabel($service)); } public function testFormatServiceLabelFormatsIncludedService(): void { $service = new Service(); $service->label = 'Ortstaxe'; $service->price = 0.0; $this->assertSame('Ortstaxe (inkl.)', $this->formatter->formatServiceLabel($service)); } public function testFormatServiceLabelFormatsPositivePrice(): void { $service = new Service(); $service->label = 'Parkplatz'; $service->price = 12.5; $this->assertSame('Parkplatz (€12,50)', $this->formatter->formatServiceLabel($service)); } public function testFormatServiceLabelFormatsNegativePrice(): void { $service = new Service(); $service->label = 'Rabatt'; $service->price = -8.0; $this->assertSame('Rabatt (-8,00€ Rabatt)', $this->formatter->formatServiceLabel($service)); } public function testFormatServiceLabelForServicesFallsBackWhenEmpty(): void { $this->assertSame( 'Verpflegung', $this->formatter->formatServiceLabelForServices('Verpflegung', []) ); } }