Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/02/2015 12:54:28 PM (9 years ago)
Author:
boonebgorges
Message:

Fix SQL syntax error in BP_Friends_Friendship::search_friends().

Props rittesh.patel.
Fixes #6546.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/friends/class-bp-friends-friendship.php

    r9819 r9985  
    1212        xprofile_set_field_data( 1, $u2, 'Cool Dude' );
    1313        xprofile_set_field_data( 1, $u3, 'Rock And Roll America Yeah' );
     14
     15        friends_add_friend( $u1, $u2, true );
     16        friends_add_friend( $u1, $u3, true );
     17
     18        $friends = BP_Friends_Friendship::search_friends( 'Coo', $u1 );
     19        $this->assertEquals( array( $u2 ), $friends['friends'] );
     20    }
     21
     22    /**
     23     * @ticket BP6546
     24     */
     25    public function test_search_friends_with_xprofile_inactive() {
     26        $this->deactivate_component( 'xprofile' );
     27
     28        $u1 = $this->factory->user->create();
     29        $u2 = $this->factory->user->create();
     30        $u3 = $this->factory->user->create();
     31
     32        add_user_meta( $u2, 'nickname', 'Cool Dude' );
     33        add_user_meta( $u3, 'nickname', 'Rock And Roll America Yeah' );
    1434
    1535        friends_add_friend( $u1, $u2, true );
Note: See TracChangeset for help on using the changeset viewer.