Changeset 8331
- Timestamp:
- 04/29/2014 12:36:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/tests/testcases/members/functions.php
r8314 r8331 19 19 20 20 /** 21 * ticket BP4915 21 * @ticket BP4915 22 * @group bp_core_delete_account 22 23 */ 23 24 public function test_bp_core_delete_account() { … … 53 54 $maybe_user = new WP_User( $user4 ); 54 55 $this->assertNotEquals( 0, $maybe_user->ID ); 55 unset( $maybe_user );56 57 // User cannot delete own account when account deletion is disabled58 $user5 = $this->factory->user->create( array( 'role' => 'subscriber' ) );59 $this->set_current_user( $user5 );60 bp_update_option( 'bp-disable-account-deletion', 1 );61 bp_core_delete_account( $user5 );62 $maybe_user = new WP_User( $user5 );63 $this->assertNotEquals( 0, $maybe_user->ID );64 unset( $maybe_user );65 66 // User can delete own account when account deletion is enabled67 $user6 = $this->factory->user->create( array( 'role' => 'subscriber' ) );68 $this->set_current_user( $user6 );69 bp_update_option( 'bp-disable-account-deletion', 0 );70 bp_core_delete_account( $user6 );71 $maybe_user = new WP_User( $user6 );72 $this->assertEquals( 0, $maybe_user->ID );73 56 unset( $maybe_user ); 74 57
Note: See TracChangeset
for help on using the changeset viewer.