Changeset 13314 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 08/13/2022 08:58:51 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r13140 r13314 31 31 * @since 3.0.0 32 32 */ 33 public static function set UpBeforeClass() {33 public static function set_up_before_class() { 34 34 global $wpdb; 35 35 … … 49 49 } 50 50 51 public function set Up() {52 parent::set Up();51 public function set_up() { 52 parent::set_up(); 53 53 54 54 /* … … 75 75 } 76 76 77 public function tear Down() {77 public function tear_down() { 78 78 global $wpdb; 79 79 80 80 remove_action( 'bp_blogs_recorded_existing_blogs', array( $this, 'set_autocommit_flag' ) ); 81 81 82 parent::tear Down();82 parent::tear_down(); 83 83 84 84 // If we detect that a COMMIT has been triggered during the test, clean up blog and user fixtures. … … 116 116 $deleted = parent::delete_user( $user_id ); 117 117 118 // When called in tear DownAfterClass(), BP's cleanup functions may no longer be hooked.118 // When called in tear_down_after_class(), BP's cleanup functions may no longer be hooked. 119 119 if ( bp_is_active( 'activity' ) ) { 120 120 bp_activity_remove_all_user_data( $user_id ); … … 126 126 } 127 127 128 function clean_up_global_scope() {128 public function clean_up_global_scope() { 129 129 buddypress()->bp_nav = buddypress()->bp_options_nav = buddypress()->action_variables = buddypress()->canonical_stack = buddypress()->unfiltered_uri = $GLOBALS['bp_unfiltered_uri'] = array(); 130 130 buddypress()->current_component = buddypress()->current_item = buddypress()->current_action = buddypress()->current_member_type = ''; … … 181 181 } 182 182 183 function assertPreConditions() {184 parent::assert PreConditions();183 public function assert_pre_conditions() { 184 parent::assert_pre_conditions(); 185 185 186 186 // Reinit some of the globals that might have been cleared by BP_UnitTestCase::clean_up_global_scope(). … … 189 189 } 190 190 191 function go_to( $url ) {191 public function go_to( $url ) { 192 192 $GLOBALS['bp']->loggedin_user = NULL; 193 193 $GLOBALS['bp']->pages = bp_core_get_directory_pages();
Note: See TracChangeset
for help on using the changeset viewer.