Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2017 07:44:10 PM (4 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/admin/functions.php

    r11513 r11737  
    99        parent::setUp();
    1010        $this->old_current_user = get_current_user_id();
    11         $this->set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
     11        $this->set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) );
    1212
    1313        if ( ! function_exists( 'bp_admin' ) ) {
     
    139139        $bp->foo->name = 'Foo';
    140140        $bp->active_components[ $bp->foo->id ] = 1;
    141         $new_page_ids = array( $bp->foo->id => $this->factory->post->create( array(
     141        $new_page_ids = array( $bp->foo->id => self::factory()->post->create( array(
    142142            'post_type'  => 'page',
    143143            'post_title' => $bp->foo->name,
Note: See TracChangeset for help on using the changeset viewer.