Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2017 07:44:10 PM (7 years ago)
Author:
boonebgorges
Message:

Use static factory method throughout PHPUnit tests.

See #7620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/nav/bpCoreMaybeHookNewSubnavScreenFunction.php

    r11091 r11737  
    5454
    5555    public function test_user_has_access_false_user_logged_in_my_profile() {
    56         $u = $this->factory->user->create();
     56        $u = self::factory()->user->create();
    5757        $old_current_user = get_current_user_id();
    5858        $this->set_current_user( $u );
     
    7373
    7474    public function test_user_has_access_false_user_logged_in_others_profile_default_component_accessible() {
    75         $u1 = $this->factory->user->create();
    76         $u2 = $this->factory->user->create();
     75        $u1 = self::factory()->user->create();
     76        $u2 = self::factory()->user->create();
    7777        $old_current_user = get_current_user_id();
    7878        $this->set_current_user( $u1 );
     
    108108
    109109    public function test_user_has_access_false_user_logged_in_others_profile_default_component_not_accessible() {
    110         $u1 = $this->factory->user->create();
    111         $u2 = $this->factory->user->create();
     110        $u1 = self::factory()->user->create();
     111        $u2 = self::factory()->user->create();
    112112        $old_current_user = get_current_user_id();
    113113        $this->set_current_user( $u1 );
     
    144144
    145145    public function test_user_has_access_false_user_logged_in_group() {
    146         $u = $this->factory->user->create();
    147         $g = $this->factory->group->create();
     146        $u = self::factory()->user->create();
     147        $g = self::factory()->group->create();
    148148        $old_current_user = get_current_user_id();
    149149        $this->set_current_user( $u );
     
    168168
    169169    public function test_user_has_access_false_user_logged_in_group_no_redirect_url_provided() {
    170         $u = $this->factory->user->create();
    171         $g = $this->factory->group->create();
     170        $u = self::factory()->user->create();
     171        $g = self::factory()->group->create();
    172172        $old_current_user = get_current_user_id();
    173173        $this->set_current_user( $u );
Note: See TracChangeset for help on using the changeset viewer.