[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Sat Aug 27 08:35:18 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by wonderboymusic):

 In [changeset:"38398"]:
 {{{
 #!CommitTicketReference repository="" revision="38398"
 Unit Tests:

 * Automatically delete objects that we were created during
 `wpSetUpBeforeClass` - posts, comments, terms (except 1), and user (except
 1)
 * The amount of leftover data between tests was breathtaking - use the new
 function: `_delete_all_data()`
 * Commit database transactions for all `TestCase`s, not just those that
 implement `wpSetUpBeforeClass` and `wpTearDownAfterClass`
 * The tests run 10-20 seconds faster now

 See #37699.
 }}}

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


More information about the wp-trac mailing list