Skip to:
Content

BuddyPress.org

Changeset 11217


Ignore:
Timestamp:
10/31/2016 07:35:42 PM (3 years ago)
Author:
johnjamesjacoby
Message:

Tests: Fix two XProfile tests and how they interact with the object cache.

  • Incorrectly passing a third bp string into wp_cache_delete(), resulting in debug notices
  • Deleting from an incorrect/invalid cache group.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/functions.php

    r10938 r11217  
    172172        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = 1", $u ) );
    173173        wp_cache_delete( 'bp_user_fullname_' . $u, 'bp' );
    174         wp_cache_delete( "{$u}:1", 'bp_xprofile_data', 'bp' );
     174        wp_cache_delete( "{$u}:1", 'bp_xprofile_data' );
    175175
    176176        $this->assertSame( '', xprofile_get_field_data( 1, $u ) );
     
    225225        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = 1", $u2 ) );
    226226        wp_cache_delete( 'bp_user_fullname_' . $u2, 'bp' );
    227         wp_cache_delete( 1, 'bp_xprofile_data_' . $u2, 'bp' );
     227        wp_cache_delete( "{$u2}:1", 'bp_xprofile_data' );
    228228
    229229        $expected = array(
Note: See TracChangeset for help on using the changeset viewer.