[buddypress-trac] [BuddyPress Trac] #6540: Multisite unit tests and bp_blogs_record_existing_blogs()

buddypress-trac noreply at wordpress.org
Mon Jun 29 16:32:02 UTC 2015


#6540: Multisite unit tests and bp_blogs_record_existing_blogs()
-----------------------------------+------------------
 Reporter:  imath                  |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  2.4
Component:  Tools - Unit Tests     |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------

Comment (by boonebgorges):

 [attachment:6540.2.patch] is an attempt at a patch that cleans up fixtures
 in a more targeted way, but with minimal requirements for the dev writing
 tests. Two parts:

 * Add a hook at the end of `bp_blogs_record_existing_blogs()`.
 * In `BP_UnitTestCase()`, when 'bp_blogs_recorded_existing_blogs' fires,
 set an "autocommitted" flag. During `tearDown()`, if this flag has been
 set to `true`, manually delete user and blog data.

 If need be, we could add additional content deletion to this block (like,
 say, groups). And `set_autocommit_flag()` could be used for other hooks,
 if we determined that other functions in BP were triggering autocommits.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6540#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list