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

    r9819 r11737  
    1111
    1212        $this->old_current_user = get_current_user_id();
    13         $this->set_current_user( $this->factory->user->create( array( 'role' => 'subscriber' ) ) );
     13        $this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
    1414    }
    1515
     
    2828     */
    2929    function test_activity_permalink() {
    30         $a = $this->factory->activity->create();
    31         $activity = $this->factory->activity->get_object_by_id( $a );
     30        $a = self::factory()->activity->create();
     31        $activity = self::factory()->activity->get_object_by_id( $a );
    3232
    3333        $url = bp_core_get_user_domain( $activity->user_id ) . bp_get_activity_slug() . '/' . $activity->id . '/';
Note: See TracChangeset for help on using the changeset viewer.