Changeset 11882
- Timestamp:
- 03/04/2018 09:35:46 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r11848 r11882 1038 1038 1039 1039 wp_safe_redirect( $location, $status ); 1040 die; 1040 1041 // If PHPUnit is running, do not kill execution. 1042 if ( ! defined( 'BP_TESTS_DIR' ) ) { 1043 die; 1044 } 1041 1045 } 1042 1046 -
trunk/tests/phpunit/includes/loader.php
r10470 r11882 9 9 require dirname( __FILE__ ) . '/../../../src/bp-loader.php'; 10 10 11 // Bail from redirects as they throw 'headers already sent' warnings. 12 tests_add_filter( 'wp_redirect', '__return_false' ); 13 11 14 require_once( dirname( __FILE__ ) . '/mock-mailer.php' ); 12 15 function _bp_mock_mailer( $class ) { -
trunk/tests/phpunit/includes/testcase.php
r11739 r11882 194 194 195 195 do_action( 'bp_init' ); 196 do_action( 'bp_template_redirect' ); 196 197 } 197 198 -
trunk/tests/phpunit/testcases/activity/notifications.php
r11737 r11882 51 51 52 52 // Go to the activity permalink page 53 $this->go_to( bp_activity_get_permalink( $this->a1 ) ); 54 $activity = bp_activity_get_specific( array( 'activity_ids' => $this->a1, 'show_hidden' => true, 'spam' => 'ham_only', ) ); 55 do_action( 'bp_activity_screen_single_activity_permalink', $activity['activities'][0] ); 53 $this->go_to( bp_core_get_user_domain( $this->u1 ) . 'activity/' . $this->a1 ); 56 54 57 55 $notifications = BP_Notifications_Notification::get( array( … … 81 79 82 80 // Go to the activity permalink page 83 $this->go_to( bp_activity_get_permalink( $this->a1 ) ); 84 $activity = bp_activity_get_specific( array( 'activity_ids' => $this->a1, 'show_hidden' => true, 'spam' => 'ham_only', ) ); 85 do_action( 'bp_activity_screen_single_activity_permalink', $activity['activities'][0] ); 81 $this->go_to( bp_core_get_user_domain( $this->u1 ) . 'activity/' . $this->a1 ); 86 82 87 83 $notifications = BP_Notifications_Notification::get( array( … … 113 109 114 110 // Go to the activity permalink page 115 $this->go_to( bp_activity_get_permalink( $this->a1 ) ); 116 $activity = bp_activity_get_specific( array( 'activity_ids' => $this->a1, 'show_hidden' => true, 'spam' => 'ham_only', ) ); 117 do_action( 'bp_activity_screen_single_activity_permalink', $activity['activities'][0] ); 111 $this->go_to( bp_core_get_user_domain( $this->u1 ) . 'activity/' . $this->a1 ); 118 112 119 113 $notifications = BP_Notifications_Notification::get( array( … … 143 137 // Go to the My Activity page 144 138 $this->go_to( bp_core_get_user_domain( $this->u1 ) . bp_get_activity_slug() . '/mentions/' ); 145 do_action( 'bp_activity_screen_mentions' );146 139 147 140 $notifications = BP_Notifications_Notification::get( array( … … 172 165 // Go to the My Activity page 173 166 $this->go_to( bp_core_get_user_domain( $this->u1 ) . bp_get_activity_slug() . '/mentions/' ); 174 do_action( 'bp_activity_screen_mentions' );175 167 176 168 $notifications = BP_Notifications_Notification::get( array( … … 204 196 // Go to the My Activity page 205 197 $this->go_to( bp_core_get_user_domain( $this->u1 ) . bp_get_activity_slug() . '/mentions/' ); 206 do_action( 'bp_activity_screen_mentions' );207 198 208 199 $notifications = BP_Notifications_Notification::get( array(
Note: See TracChangeset
for help on using the changeset viewer.