- Timestamp:
- 01/09/2015 08:38:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/xprofile/class-bp-xprofile-profiledata.php
r9139 r9336 37 37 $d = new BP_XProfile_ProfileData( $f, $u ); 38 38 39 wp_cache_delete( $f, 'bp_xprofile_data_' . $u);39 wp_cache_delete( "{$u}:{$f}", 'bp_xprofile_data' ); 40 40 41 41 $this->assertTrue( $d->exists() ); … … 57 57 $c = new stdClass; 58 58 $c->id = 3; 59 wp_cache_set( $f, $c, 'bp_xprofile_data_' . $u);59 wp_cache_set( "{$u}:{$f}", $c, 'bp_xprofile_data' ); 60 60 61 61 $this->assertTrue( $d->exists() ); … … 74 74 75 75 // Just to be sure 76 wp_cache_delete( $f, 'bp_xprofile_data_' . $u);76 wp_cache_delete( "{$u}:{$f}", 'bp_xprofile_data' ); 77 77 78 78 $this->assertEquals( 0, BP_XProfile_ProfileData::get_fielddataid_byid( $f, $u ) ); … … 97 97 98 98 // Ensure it's deleted from cache 99 wp_cache_delete( $f, 'bp_xprofile_data_' . $u);99 wp_cache_delete( "{$u}:{$f}", 'bp_xprofile_data' ); 100 100 101 101 $this->assertEquals( $d->id, BP_XProfile_ProfileData::get_fielddataid_byid( $f, $u ) ); … … 116 116 $d = new stdClass; 117 117 $d->id = 5; 118 wp_cache_set( $f, $d, 'bp_xprofile_data_' . $u);118 wp_cache_set( "{$u}:{$f}", $d, 'bp_xprofile_data' ); 119 119 120 120 $this->assertSame( 5, BP_XProfile_ProfileData::get_fielddataid_byid( $f, $u ) ); … … 139 139 140 140 // Ensure it's deleted from cache 141 wp_cache_delete( $f, 'bp_xprofile_data_' . $u);141 wp_cache_delete( "{$u}:{$f}", 'bp_xprofile_data' ); 142 142 143 143 $this->assertSame( 'foo', BP_XProfile_ProfileData::get_value_byid( $f, $u ) ); … … 180 180 181 181 // Ensure it's deleted from cache 182 wp_cache_delete( $f, 'bp_xprofile_data_' . $u1);183 wp_cache_delete( $f, 'bp_xprofile_data_' . $u2);182 wp_cache_delete( "{$u1}:{$f}", 'bp_xprofile_data' ); 183 wp_cache_delete( "{$u2}:{$f}", 'bp_xprofile_data' ); 184 184 185 185 $eu1 = new stdClass; … … 219 219 $d->value = 'foo'; 220 220 $d->field_id = $f; 221 wp_cache_set( $f, $d, 'bp_xprofile_data_' . $u);221 wp_cache_set( "{$u}:{$f}", $d, 'bp_xprofile_data' ); 222 222 223 223 $this->assertSame( 'foo', BP_XProfile_ProfileData::get_value_byid( $f, $u ) ); … … 253 253 $d2->last_updated = $time; 254 254 255 wp_cache_set( $f, $d1, 'bp_xprofile_data_' . $u1);256 wp_cache_set( $f, $d2, 'bp_xprofile_data_' . $u2);255 wp_cache_set( "{$u1}:{$f}", $d1, 'bp_xprofile_data' ); 256 wp_cache_set( "{$u2}:{$f}", $d2, 'bp_xprofile_data' ); 257 257 258 258 $eu1 = new stdClass; … … 314 314 315 315 // Ensure it's deleted from cache 316 wp_cache_delete( $f1, 'bp_xprofile_data_' . $u);317 wp_cache_delete( $f2, 'bp_xprofile_data_' . $u);316 wp_cache_delete( "{$u}:{$f1}", 'bp_xprofile_data' ); 317 wp_cache_delete( "{$u}:{$f2}", 'bp_xprofile_data' ); 318 318 319 319 $u_obj = new WP_User( $u ); … … 390 390 $d2->id = 2; 391 391 392 wp_cache_set( $f1, $d1, 'bp_xprofile_data_' . $u);393 wp_cache_set( $f2, $d2, 'bp_xprofile_data_' . $u);392 wp_cache_set( "{$u}:{$f1}", $d1, 'bp_xprofile_data' ); 393 wp_cache_set( "{$u}:{$f2}", $d2, 'bp_xprofile_data' ); 394 394 395 395 $u_obj = new WP_User( $u );
Note: See TracChangeset
for help on using the changeset viewer.