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

    r11256 r11737  
    1616        ) );
    1717
    18         $post_id = $this->factory->post->create( array(
     18        $post_id = self::factory()->post->create( array(
    1919            'post_status' => 'publish',
    2020            'post_type'   => 'foo',
     
    4040        ) );
    4141
    42         $post_id = $this->factory->post->create( array(
     42        $post_id = self::factory()->post->create( array(
    4343            'post_status' => 'publish',
    4444            'post_type'   => 'foo',
     
    5858     */
    5959    public function test_bp_activity_catch_transition_post_type_status_publish_existing_post() {
    60         $u = $this->factory->user->create();
     60        $u = self::factory()->user->create();
    6161
    6262        $labels = array(
     
    8585
    8686        // Create the initial post.
    87         $p = $this->factory->post->create( array(
     87        $p = self::factory()->post->create( array(
    8888            'post_author' => $u,
    8989            'post_type'   => 'foo',
     
    119119        ) );
    120120
    121         $post_id = $this->factory->post->create( array(
     121        $post_id = self::factory()->post->create( array(
    122122            'post_status' => 'publish',
    123123            'post_type'   => 'foo',
     
    151151        ) );
    152152
    153         $post_id = $this->factory->post->create( array(
     153        $post_id = self::factory()->post->create( array(
    154154            'post_status' => 'publish',
    155155            'post_type'   => 'foo',
Note: See TracChangeset for help on using the changeset viewer.