[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 require_once dirname( __FILE__ ) . '/testcase.php'; 3 4 class BP_UnitTestCase_Emails extends BP_UnitTestCase { 5 6 public static function setUpBeforeClass() { 7 parent::setUpBeforeClass(); 8 9 require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' ); 10 11 /* 12 * WP's test suite wipes out BP's email posts. 13 * We must reestablish them before our tests can be successfully run. 14 */ 15 bp_core_install_emails(); 16 } 17 18 public static function tearDownAfterClass() { 19 $emails = get_posts( array( 20 'fields' => 'ids', 21 'post_status' => 'any', 22 'post_type' => bp_get_email_post_type(), 23 'posts_per_page' => 200, 24 'suppress_filters' => false, 25 ) ); 26 27 if ( $emails ) { 28 foreach ( $emails as $email_id ) { 29 wp_delete_post( $email_id, true ); 30 } 31 } 32 33 parent::tearDownAfterClass(); 34 } 35 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Dec 5 01:00:58 2024 | Cross-referenced by PHPXref 0.7.1 |