[buddypress-trac] [BuddyPress] #5038: Unit tests do not clear DB entries when finished

buddypress-trac noreply at wordpress.org
Tue Jun 4 23:27:21 UTC 2013


#5038: Unit tests do not clear DB entries when finished
--------------------------+------------------------------
 Reporter:  r-a-y         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Unit Tests    |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by r-a-y):

 Some tests were failing for me and as I was exploring through the DB, I
 noticed that the data was still there.

 Here's what I'm using as a test:

 `phpunit --group groups`

 Try running this twice if you don't get any failed unit tests.

 Then check the BP group DB tables.  Do you see any DB entries?

 WP deletes its test data with
 [https://core.trac.wordpress.org/browser/tests/trunk/includes/bootstrap.php#L78
 _delete_all_posts()].  Which is probably why I'm not seeing any of its
 data in the DB after running a WP unit test.

 It could be that my rig is not setup properly for transaction rollbacks (I
 haven't looked into this yet), which is why I need a 2nd-opinion.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5038#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list