diff --git tests/phpunit/testcases/groups/class-bp-groups-group.php tests/phpunit/testcases/groups/class-bp-groups-group.php
index d42959c..f4db82c 100644
|
|
class BP_Tests_BP_Groups_Group_TestCases extends BP_UnitTestCase { |
1046 | 1046 | } |
1047 | 1047 | |
1048 | 1048 | /** |
| 1049 | * @group get_group_extras |
| 1050 | */ |
| 1051 | public function test_get_group_extras_when_user_id_is_specified() { |
| 1052 | $u = $this->factory->user->create(); |
| 1053 | $g = $this->factory->group->create(); |
| 1054 | $this->add_user_to_group( $u, $g ); |
| 1055 | |
| 1056 | $paged_groups = array(); |
| 1057 | $paged_groups[] = new stdClass; |
| 1058 | $paged_groups[0]->id = $g; |
| 1059 | |
| 1060 | $group_ids = array( $g ); |
| 1061 | |
| 1062 | $expected = array(); |
| 1063 | foreach ( $paged_groups as $key => $value ) { |
| 1064 | $expected[ $key ] = new stdClass; |
| 1065 | $expected[ $key ]->id = $value->id; |
| 1066 | $expected[ $key ]->is_member = '1'; |
| 1067 | $expected[ $key ]->is_invited = '0'; |
| 1068 | $expected[ $key ]->is_pending = '0'; |
| 1069 | $expected[ $key ]->is_banned = false; |
| 1070 | } |
| 1071 | |
| 1072 | $this->assertEquals( $expected, BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, false, $u ) ); |
| 1073 | } |
| 1074 | |
| 1075 | /** |
1049 | 1076 | * @group group_types |
1050 | 1077 | */ |
1051 | 1078 | public function test_group_type_single_value() { |