diff --git tests/phpunit/testcases/groups/class-bp-groups-group.php tests/phpunit/testcases/groups/class-bp-groups-group.php
index eda655f..a134a31 100644
|
|
class BP_Tests_BP_Groups_Group_TestCases extends BP_UnitTestCase { |
527 | 527 | $this->assertEquals( '12', count( $groups['groups'] ) ); |
528 | 528 | } |
529 | 529 | |
| 530 | /** |
| 531 | * @group get |
| 532 | */ |
| 533 | public function test_get_groups_with_with_no_member_total() { |
| 534 | $user_id = get_current_user_id(); |
| 535 | |
| 536 | $g1 = $this->factory->group->create( array( |
| 537 | 'name' => 'A Group' |
| 538 | ) ); |
| 539 | $g2 = $this->factory->group->create( array( |
| 540 | 'name' => 'B Group' |
| 541 | ) ); |
| 542 | |
| 543 | // Delete default user. |
| 544 | BP_Groups_Member::delete( $user_id, $g1 ); |
| 545 | BP_Groups_Member::delete( $user_id, $g2 ); |
| 546 | |
| 547 | $groups = BP_Groups_Group::get(); |
| 548 | |
| 549 | $this->assertEquals( 2, count( $groups['groups'] ) ); |
| 550 | $this->assertEquals( 2, $groups['total'] ); |
| 551 | } |
| 552 | |
530 | 553 | /** convert_type_to_order_orderby() **********************************/ |
531 | 554 | |
532 | 555 | /** |