Changeset 9281 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 12/24/2014 09:30:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r9142 r9281 55 55 } 56 56 57 function tearDown() { 58 parent::tearDown(); 59 60 /** 61 * Sites created by the WP_UnitTest_Factory_For_Blog sometimes are not removed when the current 62 * transaction is rolled back. This requires further investigation to understand the root cause 63 * but for now, we'll empty out the blogs table manually. 64 */ 65 global $wpdb; 66 67 $blogs = wp_get_sites(); 68 foreach ( $blogs as $blog ) { 69 if ( (int) $blog['blog_id'] !== 1 ) { 70 wpmu_delete_blog( $blog['blog_id'], true ); 71 } 72 } 73 } 74 57 75 function assertPreConditions() { 58 76 parent::assertPreConditions();
Note: See TracChangeset
for help on using the changeset viewer.