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/xprofile/class-bp-xprofile-query.php

    r11018 r11737  
    5959        public function test_translate_field_name_to_field_id() {
    6060                $this->create_fields( 0 );
    61                 $f = $this->factory->xprofile_field->create( array(
     61                $f = self::factory()->xprofile_field->create( array(
    6262                        'field_group_id' => $this->group,
    6363                        'type' => 'textbox',
     
    628628
    629629        protected function create_fields( $count ) {
    630                 $this->group = $this->factory->xprofile_group->create();
     630                $this->group = self::factory()->xprofile_group->create();
    631631                for ( $i = 0; $i < $count; $i++ ) {
    632                         $this->fields[] = $this->factory->xprofile_field->create( array(
     632                        $this->fields[] = self::factory()->xprofile_field->create( array(
    633633                                'field_group_id' => $this->group,
    634634                                'type' => 'textbox',
     
    639639        protected function create_users( $count ) {
    640640                for ( $i = 0; $i < $count; $i++ ) {
    641                         $this->users[] = $this->factory->user->create();
     641                        $this->users[] = self::factory()->user->create();
    642642                }
    643643        }
Note: See TracChangeset for help on using the changeset viewer.