login()->loginNami()->withoutExceptionHandling(); $participant = Participant::factory() ->for(Form::factory()->mailTop('mail top')->mailBottom('mail bottom'))->create(); $mail = new ConfirmRegistrationMail($participant); $mail->assertSeeInText('mail top'); $mail->assertSeeInText('mail bottom'); } public function testItShowsParticipantGreeting(): void { $this->login()->loginNami()->withoutExceptionHandling(); $participant = Participant::factory()->for(Form::factory()->sections([ FormtemplateSectionRequest::new()->name('Persönliches')->fields([ $this->textField('vorname')->name('Vorname')->specialType(SpecialType::FIRSTNAME), $this->textField('nachname')->specialType(SpecialType::LASTNAME), ]) ])) ->data(['vorname' => 'Max', 'nachname' => 'Muster']) ->create(); $mail = new ConfirmRegistrationMail($participant); $mail->assertSeeInText('# Hallo Max Muster'); $mail->assertSeeInText('## Persönliches'); $mail->assertSeeInText('* Vorname: Max'); } }