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/members/activity.php

    r9819 r11737  
    1212     */
    1313    public function test_bp_members_format_activity_action_new_member() {
    14         $u = $this->factory->user->create();
    15         $a = $this->factory->activity->create( array(
     14        $u = self::factory()->user->create();
     15        $a = self::factory()->activity->create( array(
    1616            'component' => buddypress()->members->id,
    1717            'type' => 'new_member',
     
    3333        $bp = buddypress();
    3434
    35         $u1 = $this->factory->user->create();
    36         $u2 = $this->factory->user->create();
    37         $u3 = $this->factory->user->create();
     35        $u1 = self::factory()->user->create();
     36        $u2 = self::factory()->user->create();
     37        $u3 = self::factory()->user->create();
    3838
    39         $au1 = $this->factory->activity->create( array(
     39        $au1 = self::factory()->activity->create( array(
    4040            'component' => 'xprofile',
    4141            'type' => 'new_member',
     
    4343        ) );
    4444
    45         $au2 = $this->factory->activity->create( array(
     45        $au2 = self::factory()->activity->create( array(
    4646            'component' => 'xprofile',
    4747            'type' => 'new_member',
     
    4949        ) );
    5050
    51         $au3 = $this->factory->activity->create( array(
     51        $au3 = self::factory()->activity->create( array(
    5252            'component' => 'xprofile',
    5353            'type' => 'new_member',
Note: See TracChangeset for help on using the changeset viewer.