Changeset 11125
- Timestamp:
- 09/20/2016 09:58:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/friends/functions.php
r11124 r11125 28 28 friends_add_friend( $u3, $u1 ); 29 29 30 // Set the time of the earlier friendship for reliable ordering of the results. 31 $fid = friends_get_friendship_id( $u2, $u1 ); 32 $friendship = new BP_Friends_Friendship( $fid, false, false ); 33 $friendship->date_created = date( 'Y-m-d H:i:s', time() - 60 ); 34 $friendship->save(); 35 30 36 // get request count for user 1 and assert 31 37 $requests = friends_get_friendship_request_user_ids( $u1 ); 32 $this->assertEquals( array( $u 2, $u3), $requests );38 $this->assertEquals( array( $u3, $u2 ), $requests ); 33 39 34 40 // accept friendship … … 55 61 // request friendship 56 62 friends_add_friend( $u2, $u1 ); 63 // Set the time of the earlier friendship for reliable ordering of the results. 64 $fid = friends_get_friendship_id( $u2, $u1 ); 65 $friendship = new BP_Friends_Friendship( $fid, false, false ); 66 $friendship->date_created = date( 'Y-m-d H:i:s', time() - 60 ); 67 $friendship->save(); 57 68 58 69 // get request count for user 1 and assert … … 65 76 // refetch request count for user 1 and assert 66 77 $requests = friends_get_friendship_request_user_ids( $u1 ); 67 $this->assertEquals( array( $u 2, $u3), $requests );78 $this->assertEquals( array( $u3, $u2 ), $requests ); 68 79 } 69 80
Note: See TracChangeset
for help on using the changeset viewer.