Changeset 9251 for trunk/tests/phpunit/testcases/blogs/cache.php
- Timestamp:
- 12/22/2014 03:49:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/blogs/cache.php
r9231 r9251 255 255 $this->assertEquals( $first_query_count, $wpdb->num_queries ); 256 256 } 257 258 /** 259 * @group bp_blogs_total_blogs 260 */ 261 public function test_bp_blogs_total_blogs_count_after_delete_blog() { 262 if ( ! is_multisite() ) { 263 return; 264 } 265 266 $u = $this->factory->user->create(); 267 268 // need to make sure we set the 'public' flag due to how BP_Blogs_Blogs:get_all() works 269 $b1 = $this->factory->blog->create( array( 270 'meta' => array( 271 'public' => 1 272 ) 273 ) ); 274 $b2 = $this->factory->blog->create( array( 275 'meta' => array( 276 'public' => 1 277 ) 278 ) ); 279 280 bp_blogs_record_blog( $b1, $u ); 281 bp_blogs_record_blog( $b2, $u ); 282 283 // prime total blog count 284 bp_blogs_total_blogs(); 285 286 // delete a blog 287 wpmu_delete_blog( $b2 ); 288 289 $this->assertEquals( 1, bp_blogs_total_blogs() ); 290 } 257 291 }
Note: See TracChangeset
for help on using the changeset viewer.