diff --git a/projects/packages/forms/tests/php/contact-form/test-class.contact-form.php b/projects/packages/forms/tests/php/contact-form/test-class.contact-form.php index 0148b98822261..51e65b7ebbbb9 100644 --- a/projects/packages/forms/tests/php/contact-form/test-class.contact-form.php +++ b/projects/packages/forms/tests/php/contact-form/test-class.contact-form.php @@ -98,6 +98,11 @@ public function tear_down() { remove_all_filters( 'wp_mail' ); remove_all_filters( 'grunion_still_email_spam' ); remove_all_filters( 'jetpack_contact_form_is_spam' ); + + // Reset the forms array + Contact_Form::$forms = array(); + Contact_Form::$last = null; + Contact_Form::$current_form = null; } /**