- Timestamp:
- 11/03/2014 06:14:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/class-bp-group-member-query.php
r8958 r9120 119 119 120 120 public function test_with_group_role_admin() { 121 $g = $this->factory->group->create(); 122 $u1 = $this->create_user(); 123 $u2 = $this->create_user(); 124 $u3 = $this->create_user(); 121 $u1 = $this->create_user(); 122 $u2 = $this->create_user(); 123 $u3 = $this->create_user(); 124 $g = $this->factory->group->create( array( 125 'creator_id' => $u1 126 ) ); 125 127 $time = time(); 126 128 … … 169 171 170 172 public function test_with_group_role_member_admin() { 171 $g = $this->factory->group->create(); 172 $u1 = $this->create_user(); 173 $u2 = $this->create_user(); 174 $u3 = $this->create_user(); 173 $u1 = $this->create_user(); 174 $u2 = $this->create_user(); 175 $u3 = $this->create_user(); 176 $g = $this->factory->group->create( array( 177 'creator_id' => $u1, 178 ) ); 175 179 $time = time(); 176 180 … … 194 198 195 199 public function test_with_group_role_mod_admin() { 196 $g = $this->factory->group->create(); 197 $u1 = $this->create_user(); 198 $u2 = $this->create_user(); 199 $u3 = $this->create_user(); 200 $u1 = $this->create_user(); 201 $u2 = $this->create_user(); 202 $u3 = $this->create_user(); 203 $g = $this->factory->group->create( array( 204 'creator_id' => $u1, 205 ) ); 200 206 $time = time(); 201 207 … … 219 225 220 226 public function test_with_group_role_member_mod_admin() { 221 $g = $this->factory->group->create(); 222 $u1 = $this->create_user(); 223 $u2 = $this->create_user(); 224 $u3 = $this->create_user(); 227 $u1 = $this->create_user(); 228 $u2 = $this->create_user(); 229 $u3 = $this->create_user(); 230 $g = $this->factory->group->create( array( 231 'creator_id' => $u1, 232 ) ); 225 233 $time = time(); 226 234 … … 244 252 245 253 public function test_with_group_role_member_mod_admin_banned() { 246 $g = $this->factory->group->create();247 254 $u1 = $this->create_user(); 248 255 $u2 = $this->create_user(); 249 256 $u3 = $this->create_user(); 250 257 $u4 = $this->create_user(); 258 $g = $this->factory->group->create( array( 259 'creator_id' => $u1, 260 ) ); 251 261 $time = time(); 252 262 … … 294 304 $ids = wp_parse_id_list( array_keys( $query_members->results ) ); 295 305 $this->assertEquals( array( $u1, ), $ids ); 296 }297 298 public function test_group_has_no_members() {299 $g = $this->factory->group->create();300 $u1 = $this->create_user();301 302 $query_members = new BP_Group_Member_Query( array(303 'group_id' => $g,304 'group_role' => array( 'member', 'mod', 'admin' ),305 ) );306 307 $ids = wp_parse_id_list( array_keys( $query_members->results ) );308 $this->assertEquals( array(), $ids );309 306 } 310 307
Note: See TracChangeset
for help on using the changeset viewer.