[wp-trac] [WordPress Trac] #41485: MockPHPMailer is not fully reset between tests

WordPress Trac noreply at wordpress.org
Sat Jul 29 19:05:56 UTC 2017


#41485: MockPHPMailer is not fully reset between tests
--------------------------+-----------------------------
 Reporter:  pessoft       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Mail          |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 phpunit tests for mail call reset_phpmailer_instance() function from mock-
 mailer to reset the phpmailer instance. This function currently only
 cleans up array of mock sent emails, but other parameters of phpmailer are
 kept "dirty" from previous tests. This might influence consistency of
 tests.

 Proposed solution is to recreate the phpmailer instance fully as it is
 done in bootstrap.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41485>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list