Changeset 7809 for trunk/tests/testcases/core/functions.php
- Timestamp:
- 02/06/2014 06:58:17 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/tests/testcases/core/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/core/functions.php
r7426 r7809 256 256 } 257 257 258 /** 259 * @group bp_core_get_directory_pages 260 */ 261 public function test_bp_core_get_directory_pages_after_page_edit() { 262 // Set the cache 263 $pages = bp_core_get_directory_pages(); 264 265 // Update one of the posts 266 switch_to_blog( bp_get_root_blog_id() ); 267 268 // grab the first one 269 foreach ( $pages as $page ) { 270 $p = $page; 271 break; 272 } 273 274 $post = get_post( $p->id ); 275 $post->post_title .= ' Foo'; 276 wp_update_post( $post ); 277 278 restore_current_blog(); 279 280 $this->assertFalse( wp_cache_get( 'directory_pages', 'bp' ) ); 281 } 282 283 /** 284 * @group bp_core_get_directory_pages 285 */ 286 public function test_bp_core_get_directory_pages_pages_settings_update() { 287 // Set the cache 288 $pages = bp_core_get_directory_pages(); 289 290 // Mess with it but put it back 291 $v = bp_get_option( 'bp-pages' ); 292 bp_update_option( 'bp-pages', 'foo' ); 293 294 $this->assertFalse( wp_cache_get( 'directory_pages', 'bp' ) ); 295 296 bp_update_option( 'bp-pages', $v ); 297 } 298 258 299 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)