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), ]) ]) ->mailTop('mail top')->mailBottom('mail bottom') ) ->data(['vorname' => 'Max', 'nachname' => 'Muster']) ->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), $this->checkboxField('fullyear')->name('Volljährig'), ]) ])) ->data(['vorname' => 'Max', 'nachname' => 'Muster', 'fullyear' => true]) ->create(); $mail = new ConfirmRegistrationMail($participant); $mail->assertSeeInText('# Hallo Max Muster'); $mail->assertSeeInText('## Persönliches'); $mail->assertSeeInText('* Vorname: Max'); $mail->assertSeeInText('* Volljährig: Ja'); } }