Changeset 8329 for trunk/tests/testcases/groups/template.php
- Timestamp:
- 04/28/2014 11:24:06 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/tests/testcases/groups/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/groups/template.php
r8069 r8329 97 97 $ids = wp_parse_id_list( wp_list_pluck( $groups_template->groups, 'id' ) ); 98 98 $this->assertEquals( array( $g1, $g3, $g2, ), $ids ); 99 } 100 101 /** 102 * Test using the 'slug' parameter in bp_has_groups() 103 * 104 * Note: The 'slug' parameter currently also requires the 'type' to be set 105 * to 'single-group'. 106 * 107 * @group bp_has_groups 108 */ 109 public function test_bp_has_groups_single_group_with_slug() { 110 $g1 = $this->factory->group->create( array( 111 'name' => 'Test Group', 112 'slug' => 'test-group', 113 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 100 ), 114 ) ); 115 116 global $groups_template; 117 bp_has_groups( array( 118 'type' => 'single-group', 119 'slug' => 'test-group', 120 ) ); 121 122 $ids = wp_parse_id_list( wp_list_pluck( $groups_template->groups, 'id' ) ); 123 $this->assertEquals( array( $g1 ), $ids ); 124 125 $this->assertEquals( 1, $groups_template->group_count ); 99 126 } 100 127
Note: See TracChangeset
for help on using the changeset viewer.