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

    r10276 r11737  
    4141                $now_time = date( 'Y-m-d H:i:s', $time );
    4242
    43                 $this->factory->activity->create( array(
     43                self::factory()->activity->create( array(
    4444                        'user_id' => $d['u'],
    4545                        'component' => buddypress()->profile->id,
     
    7575                $now_time = date( 'Y-m-d H:i:s', $time );
    7676
    77                 $this->factory->activity->create( array(
     77                self::factory()->activity->create( array(
    7878                        'user_id' => $d['u'],
    7979                        'component' => buddypress()->profile->id,
     
    278278         */
    279279        public function test_bp_xprofile_format_activity_action_new_avatar() {
    280                 $u = $this->factory->user->create();
    281                 $a = $this->factory->activity->create( array(
     280                $u = self::factory()->user->create();
     281                $a = self::factory()->activity->create( array(
    282282                        'component' => 'profile',
    283283                        'type' => 'new_avatar',
     
    297297         */
    298298        public function test_bp_xprofile_format_activity_action_updated_profile() {
    299                 $u = $this->factory->user->create();
    300                 $a = $this->factory->activity->create( array(
     299                $u = self::factory()->user->create();
     300                $a = self::factory()->activity->create( array(
    301301                        'component' => buddypress()->profile->id,
    302302                        'type' => 'updated_profile',
     
    312312
    313313        protected function setup_updated_profile_data() {
    314                 $this->updated_profile_data['u'] = $this->factory->user->create();
    315                 $this->updated_profile_data['g'] = $this->factory->xprofile_group->create();
    316                 $this->updated_profile_data['f'] = $this->factory->xprofile_field->create( array(
     314                $this->updated_profile_data['u'] = self::factory()->user->create();
     315                $this->updated_profile_data['g'] = self::factory()->xprofile_group->create();
     316                $this->updated_profile_data['f'] = self::factory()->xprofile_field->create( array(
    317317                        'field_group_id' => $this->updated_profile_data['g'],
    318318                ) );
Note: See TracChangeset for help on using the changeset viewer.