Changeset 12744 for trunk/tests/phpunit/testcases/groups/template.php
- Timestamp:
- 10/09/2020 01:25:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/template.php
r12516 r12744 116 116 $ids = wp_parse_id_list( wp_list_pluck( $groups_template->groups, 'id' ) ); 117 117 $this->assertEquals( array( $g1 ), $ids ); 118 119 $this->assertEquals( 1, $groups_template->group_count ); 120 } 121 122 /** 123 * Test using the 'status' parameter in bp_has_groups() 124 * 125 * @group bp_has_groups 126 */ 127 public function test_bp_has_groups_status() { 128 $g1 = self::factory()->group->create( array( 129 'status' => 'public', 130 ) ); 131 $g2 = self::factory()->group->create( array( 132 'status' => 'private', 133 ) ); 134 $g3 = self::factory()->group->create( array( 135 'status' => 'hidden', 136 ) ); 137 138 global $groups_template; 139 bp_has_groups( array( 140 'status' => 'private', 141 ) ); 142 143 $ids = wp_parse_id_list( wp_list_pluck( $groups_template->groups, 'id' ) ); 144 $this->assertEqualSets( array( $g2 ), $ids ); 118 145 119 146 $this->assertEquals( 1, $groups_template->group_count );
Note: See TracChangeset
for help on using the changeset viewer.