[wp-trac] [WordPress Trac] #34161: PhpMailer mock decorator methods

WordPress Trac noreply at wordpress.org
Tue Oct 6 03:21:33 UTC 2015


#34161: PhpMailer mock decorator methods
------------------------------------+------------------------------
 Reporter:  welcher                 |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Build/Test Tools        |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by welcher):

 * keywords:  has-patch => has-patch dev-feedback


Old description:

> When writing unit tests for items that use the Mock PHPMailer working
> with the object is tedious. I am proposing some decorator methods to
> allow better clarity and access to the various items in the `mock_sent`
> array.
>
> The attached patch includes the new methods and updates a test to
> demonstrate usage as well as the enhanced readability the new method
> provide.

New description:

 When writing unit tests for items that use the Mock PHPMailer working with
 the object is tedious. I am proposing some decorator methods to allow
 better clarity and access to the various items in the `mock_sent` array.

 The attached patch includes the new methods and updates a test to
 demonstrate usage as well as the enhanced readability the new methods
 provide.

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34161#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list