setEmail(' Max.Mustermann@EP-Reisen.DE '); $this->assertSame('max.mustermann@ep-reisen.de', $communication->getEmail()); } public function testSetEmailKeepsNull(): void { $communication = (new Communication())->setEmail(null); $this->assertNull($communication->getEmail()); } /** * The outbound BusPro payload must carry the normalized form, not the raw input. */ public function testPayloadCarriesTheNormalizedAddress(): void { $communication = (new Communication()) ->setEmail('Max.Mustermann@EP-Reisen.DE') ->setMobile('0170 1234567') ; $this->assertSame('max.mustermann@ep-reisen.de', $communication->toPayload()['email']); } }