From 5e49e5bd591317eb4bec89a81ed7cdd8f378f3b1 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 13 Apr 2024 21:49:29 +0200 Subject: [PATCH] Add test for checkbox field presenter --- tests/Feature/Form/FormRegisterMailTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/Form/FormRegisterMailTest.php b/tests/Feature/Form/FormRegisterMailTest.php index 7748386a..727ce379 100644 --- a/tests/Feature/Form/FormRegisterMailTest.php +++ b/tests/Feature/Form/FormRegisterMailTest.php @@ -42,14 +42,16 @@ class FormRegisterMailTest extends FormTestCase 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']) + ->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'); } }