Skip to:
Content

BuddyPress.org


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

    r11559 r11737  
    1212                buddypress()->members->types = array();
    1313                $this->old_current_user = get_current_user_id();
    14                 $this->set_current_user( $this->factory->user->create( array( 'role' => 'subscriber' ) ) );
     14                $this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
    1515        }
    1616
     
    6969         */
    7070        public function test_group_previous_slug_current_slug_should_resolve() {
    71                 $g1 = $this->factory->group->create( array(
     71                $g1 = self::factory()->group->create( array(
    7272                        'slug' => 'george',
    7373                ) );
     
    8686         */
    8787        public function test_group_previous_slug_should_resolve() {
    88                 $g1 = $this->factory->group->create( array(
     88                $g1 = self::factory()->group->create( array(
    8989                        'slug' => 'george',
    9090                ) );
     
    104104         */
    105105        public function test_group_previous_slug_most_recent_takes_precedence() {
    106                 $g1 = $this->factory->group->create( array(
     106                $g1 = self::factory()->group->create( array(
    107107                        'slug' => 'george',
    108108                ) );
     
    112112                        'notify_members' => false,
    113113                ) );
    114                 $g2 = $this->factory->group->create( array(
     114                $g2 = self::factory()->group->create( array(
    115115                        'slug' => 'george',
    116116                ) );
Note: See TracChangeset for help on using the changeset viewer.