Changeset 10815 for trunk/tests/phpunit/testcases/blogs/functions.php
- Timestamp:
- 05/27/2016 05:21:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/blogs/functions.php
r10545 r10815 985 985 } 986 986 987 /** 988 * @group bp_blogs_record_existing_blogs 989 */ 990 public function test_bp_blogs_record_existing_blogs_limit() { 991 if ( ! is_multisite() ) { 992 return; 993 } 994 995 $old_user = get_current_user_id(); 996 997 $u = $this->factory->user->create(); 998 $this->set_current_user( $u ); 999 1000 // Create three sites. 1001 $this->factory->blog->create_many( 3, array( 1002 'user_id' => $u 1003 ) ); 1004 1005 // Record each site one at a time 1006 bp_blogs_record_existing_blogs( array( 1007 'limit' => 1 1008 ) ); 1009 1010 // Assert! 1011 $blogs = bp_blogs_get_blogs( array( 1012 'user_id' => $u 1013 ) ); 1014 $this->assertSame( 3, (int) $blogs['total'] ); 1015 1016 $this->set_current_user( $old_user ); 1017 } 1018 987 1019 protected function activity_exists_for_post( $post_id ) { 988 1020 $a = bp_activity_get( array(
Note: See TracChangeset
for help on using the changeset viewer.