Fix tests
This commit is contained in:
parent
9144ae1028
commit
8d2f8ec03d
|
@ -56,7 +56,7 @@ class ConfirmRegistrationMail extends Mailable
|
|||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array
|
||||
* @return array<int, mixed>
|
||||
*/
|
||||
public function attachments()
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ class FormFactory extends Factory
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array<int, FormtemplateFieldRequest> $sections
|
||||
* @param array<int, FormtemplateFieldRequest> $fields
|
||||
*/
|
||||
public function fields(array $fields): self
|
||||
{
|
||||
|
|
|
@ -16,8 +16,19 @@ class FormRegisterMailTest extends FormTestCase
|
|||
public function testItShowsFormContent(): void
|
||||
{
|
||||
$this->login()->loginNami()->withoutExceptionHandling();
|
||||
$participant = Participant::factory()
|
||||
->for(Form::factory()->mailTop('mail top')->mailBottom('mail bottom'))->create();
|
||||
|
||||
$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');
|
||||
|
|
Loading…
Reference in New Issue