Changeset 11737 for trunk/tests/phpunit/testcases/friends/activity.php
- Timestamp:
- 11/03/2017 07:44:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/friends/activity.php
r10748 r11737 11 11 */ 12 12 public function test_bp_friends_format_activity_action_friendship_accepted() { 13 $u1 = $this->factory->user->create();14 $u2 = $this->factory->user->create();15 16 $a = $this->factory->activity->create( array(13 $u1 = self::factory()->user->create(); 14 $u2 = self::factory()->user->create(); 15 16 $a = self::factory()->activity->create( array( 17 17 'component' => buddypress()->friends->id, 18 18 'type' => 'friendship_accepted', … … 33 33 */ 34 34 public function test_bp_friends_format_activity_action_friendship_created() { 35 $u1 = $this->factory->user->create();36 $u2 = $this->factory->user->create();37 38 $a = $this->factory->activity->create( array(35 $u1 = self::factory()->user->create(); 36 $u2 = self::factory()->user->create(); 37 38 $a = self::factory()->activity->create( array( 39 39 'component' => buddypress()->friends->id, 40 40 'type' => 'friendship_created', … … 56 56 $old_user = get_current_user_id(); 57 57 58 $u1 = $this->factory->user->create();59 $u2 = $this->factory->user->create();58 $u1 = self::factory()->user->create(); 59 $u2 = self::factory()->user->create(); 60 60 61 61 friends_add_friend( $u2, $u1 ); … … 70 70 71 71 // Random activities 72 $au1 = $this->factory->activity->create( array( 'user_id' => $u1 ) );73 $au2 = $this->factory->activity->create( array( 'user_id' => $u2 ) );72 $au1 = self::factory()->activity->create( array( 'user_id' => $u1 ) ); 73 $au2 = self::factory()->activity->create( array( 'user_id' => $u2 ) ); 74 74 75 75 $fc_act = bp_activity_get( array( … … 103 103 $old_user = get_current_user_id(); 104 104 105 $u1 = $this->factory->user->create();106 $u2 = $this->factory->user->create();105 $u1 = self::factory()->user->create(); 106 $u2 = self::factory()->user->create(); 107 107 108 108 friends_add_friend( $u2, $u1 ); … … 141 141 $old_user = get_current_user_id(); 142 142 143 $u1 = $this->factory->user->create();144 $u2 = $this->factory->user->create();143 $u1 = self::factory()->user->create(); 144 $u2 = self::factory()->user->create(); 145 145 $users = array( $u1, $u2 ); 146 146 … … 155 155 $this->set_current_user( $old_user ); 156 156 157 $users[] = $this->factory->user->create();158 $users[] = $this->factory->user->create();157 $users[] = self::factory()->user->create(); 158 $users[] = self::factory()->user->create(); 159 159 160 160 foreach( $users as $u ) { … … 192 192 $old_user = get_current_user_id(); 193 193 194 $u1 = $this->factory->user->create();195 $u2 = $this->factory->user->create();194 $u1 = self::factory()->user->create(); 195 $u2 = self::factory()->user->create(); 196 196 197 197 friends_add_friend( $u2, $u1 ); … … 222 222 public function test_delete_user_with_no_activities() { 223 223 $old_user = get_current_user_id(); 224 $u1 = $this->factory->user->create();224 $u1 = self::factory()->user->create(); 225 225 $this->set_current_user( $u1 ); 226 226
Note: See TracChangeset
for help on using the changeset viewer.