Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (18 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/messages/template.php

    r13339 r13980  
    281281        // set user to anonymous
    282282        $old_current_user = get_current_user_id();
    283         $this->set_current_user( 0 );
     283        self::set_current_user( 0 );
    284284
    285285        // now, do the message thread query
     
    291291        $this->assertEmpty( $messages_template->threads );
    292292
    293         $this->set_current_user( $old_current_user );
     293        self::set_current_user( $old_current_user );
    294294    }
    295295
     
    462462        // set $u1 as current user.
    463463        $old_current_user = get_current_user_id();
    464         $this->set_current_user( $u1 );
     464        self::set_current_user( $u1 );
    465465
    466466        $messages_template = new BP_Messages_Box_Template(
     
    471471        );
    472472
    473         $this->set_current_user( $old_current_user );
     473        self::set_current_user( $old_current_user );
    474474
    475475        $thread = reset( $messages_template->threads );
Note: See TracChangeset for help on using the changeset viewer.