Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (3 months ago)
Author:
espellcaste
Message:

Unit Tests: Conducted a thorough review of existing unit tests files and improved them to ensure robustness.

Props imath.

Closes https://github.com/buddypress/buddypress/pull/295
Fixes #9081

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/functions.php

    r13894 r13980  
    3333
    3434        // 1. Admin can delete user account
    35         $this->set_current_user( $admin_user );
     35        self::set_current_user( $admin_user );
    3636        $user1 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
    3737        bp_core_delete_account( $user1 );
     
    5252        $user3 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
    5353        $user4 = self::factory()->user->create( array( 'role' => 'subscriber' ) );
    54         $this->set_current_user( $user3 );
     54        self::set_current_user( $user3 );
    5555        bp_core_delete_account( $user4 );
    5656        $maybe_user = new WP_User( $user4 );
     
    5959
    6060        // Cleanup
    61         $this->set_current_user( $current_user );
     61        self::set_current_user( $current_user );
    6262        bp_update_option( 'bp-disable-account-deletion', $deletion_disabled );
    6363    }
     
    747747
    748748        // Create the signup.
    749         $this->factory->signup->create( array(
     749        self::factory()->signup->create( array(
    750750            'user_login'     => 'test',
    751751            'user_email'     => 'test@example.com',
Note: See TracChangeset for help on using the changeset viewer.