- Timestamp:
- 11/03/2017 07:44:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/notifications.php
r11256 r11737 15 15 parent::setUp(); 16 16 $this->current_user = get_current_user_id(); 17 $this->u1 = $this->factory->user->create();18 $this->u2 = $this->factory->user->create();17 $this->u1 = self::factory()->user->create(); 18 $this->u2 = self::factory()->user->create(); 19 19 $this->set_current_user( $this->u1 ); 20 20 … … 274 274 protected function create_notifications() { 275 275 $u1_mentionname = bp_activity_get_user_mentionname( $this->u1 ); 276 $this->a1 = $this->factory->activity->create( array(276 $this->a1 = self::factory()->activity->create( array( 277 277 'user_id' => $this->u2, 278 278 'component' => buddypress()->activity->id, … … 281 281 ) ); 282 282 $u2_mentionname = bp_activity_get_user_mentionname( $this->u2 ); 283 $this->a2 = $this->factory->activity->create( array(283 $this->a2 = self::factory()->activity->create( array( 284 284 'user_id' => $this->u1, 285 285 'component' => buddypress()->activity->id, … … 296 296 297 297 // Current user is $this->u1, so $this->u2 posted the mention 298 $a = $this->factory->activity->create( array(298 $a = self::factory()->activity->create( array( 299 299 'user_id' => $this->u2, 300 300 'component' => buddypress()->activity->id, … … 338 338 */ 339 339 public function test_bp_activity_comment_add_notification() { 340 $a = $this->factory->activity->create( array(340 $a = self::factory()->activity->create( array( 341 341 'user_id' => $this->u1, 342 342 'component' => buddypress()->activity->id, … … 352 352 ) ); 353 353 354 $u3 = $this->factory->user->create();354 $u3 = self::factory()->user->create(); 355 355 356 356 $r3 = bp_activity_new_comment( array( … … 381 381 public function test_activity_reply_notifications_for_blog_comment_to_activity_comment_sync() { 382 382 $old_user = get_current_user_id(); 383 $u1 = $this->factory->user->create();384 $u2 = $this->factory->user->create();385 $u3 = $this->factory->user->create();383 $u1 = self::factory()->user->create(); 384 $u2 = self::factory()->user->create(); 385 $u3 = self::factory()->user->create(); 386 386 387 387 $this->set_current_user( $u1 ); … … 395 395 396 396 // create the blog post 397 $post_id = $this->factory->post->create( array(397 $post_id = self::factory()->post->create( array( 398 398 'post_status' => 'publish', 399 399 'post_type' => 'post', … … 415 415 ) ); 416 416 // Approve the comment 417 $this->factory->comment->update_object( $c1, array( 'comment_approved' => 1 ) );417 self::factory()->comment->update_object( $c1, array( 'comment_approved' => 1 ) ); 418 418 419 419 $this->set_current_user( $u3 ); … … 431 431 ) ); 432 432 // Approve the comment 433 $this->factory->comment->update_object( $c2, array( 'comment_approved' => 1 ) );433 self::factory()->comment->update_object( $c2, array( 'comment_approved' => 1 ) ); 434 434 435 435 // Get activity IDs.
Note: See TracChangeset
for help on using the changeset viewer.