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/core/functions/bpCoreGetDirectoryPageIds.php

    r11256 r11737  
    4545        $old_page_ids = bp_core_get_directory_page_ids();
    4646
    47         $p = $this->factory->post->create( array(
     47        $p = self::factory()->post->create( array(
    4848            'post_status' => 'publish',
    4949            'post_type' => 'page',
     
    263263
    264264        // create a blog
    265         $u = $this->factory->user->create();
    266         $b1 = $this->factory->blog->create( array( 'user_id' => $u ) );
     265        $u = self::factory()->user->create();
     266        $b1 = self::factory()->blog->create( array( 'user_id' => $u ) );
    267267
    268268        // switch to blog and create some dummy posts until we reach a post ID that
    269269        // matches our BP activity page ID
    270270        switch_to_blog( $b1 );
    271         $p = $this->factory->post->create();
     271        $p = self::factory()->post->create();
    272272        while( $p <= $dir_pages->activity->id ) {
    273             $p = $this->factory->post->create();
     273            $p = self::factory()->post->create();
    274274        }
    275275
Note: See TracChangeset for help on using the changeset viewer.