Changeset 9302
- Timestamp:
- 01/06/2015 04:10:41 AM (10 years ago)
- Location:
- trunk/tests/phpunit/testcases/messages
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/messages/class.bp-messages-thread.php
r9139 r9302 24 24 ) ); 25 25 26 $threads = BP_Messages_Thread::get_current_threads_for_user( $u2, 'inbox', 'all', null, null, 'ar' ); 26 $threads = BP_Messages_Thread::get_current_threads_for_user( array( 27 'user_id' => $u2, 28 'search_terms' => 'ar', 29 ) ); 27 30 28 31 $expected = array( $t2 ); … … 51 54 ) ); 52 55 56 $threads = BP_Messages_Thread::get_current_threads_for_user( array( 57 'user_id' => $u1, 58 'box' => 'sentbox', 59 'search_terms' => 'ar', 60 ) ); 61 62 $expected = array( $t2 ); 63 $found = wp_parse_id_list( wp_list_pluck( $threads['threads'], 'thread_id' ) ); 64 65 $this->assertSame( $expected, $found ); 66 } 67 68 /** 69 * @group get_current_threads_for_user 70 * @expectedDeprecated BP_Messages_Thread::get_current_threads_for_user 71 */ 72 public function test_get_current_threads_for_user_with_old_args() { 73 $u1 = $this->factory->user->create(); 74 $u2 = $this->factory->user->create(); 75 76 $t1 = $this->factory->message->create( array( 77 'sender_id' => $u1, 78 'recipients' => array( $u2 ), 79 'subject' => 'Foo', 80 ) ); 81 82 $t2 = $this->factory->message->create( array( 83 'sender_id' => $u1, 84 'recipients' => array( $u2 ), 85 'subject' => 'Bar', 86 ) ); 87 53 88 $threads = BP_Messages_Thread::get_current_threads_for_user( $u1, 'sentbox', 'all', null, null, 'ar' ); 54 89
Note: See TracChangeset
for help on using the changeset viewer.