Skip to content

Testing

phil/contact-form-bundle
AreaWhat is covered
ContactMailerSender, recipients, Reply-To, subjects, headers safe from line breaks, templates, locale
ContactFormController, ContactFormType, ContactMessageThe page, a sent message, an incomplete one, a transport that is down, options, every check
PhilContactFormBundleThe services, the configuration and its refusals, the spam protection required

A functional suite boots a kernel with FrameworkBundle — a mailer that sends nowhere —, TwigBundle, the spam protection and the bundle under /contact: ContactFormBundleTest renders the page in French, submits it as a browser would, proof of work solved, reads the email sent, and sees a submission without protection held. Installed on its own, where FrameworkBundle is a development requirement, the suite is skipped.

vendor/bin/phpunit packages/contact-form-bundle/tests