Changeset 11103
- Timestamp:
- 09/14/2016 10:20:39 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-group.php
r11100 r11103 441 441 public function __isset( $key ) { 442 442 switch ( $key ) { 443 case 'admins' : 444 case 'is_invited' : 445 case 'is_member' : 446 case 'is_pending' : 443 447 case 'last_activity' : 448 case 'mods' : 444 449 case 'total_member_count' : 445 case 'admins' : 446 case 'mods' : 450 case 'user_has_access' : 447 451 return true; 448 452 -
trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php
r11095 r11103 677 677 } 678 678 679 /** 680 * @ticket BP5451 681 */ 682 public function test_bp_groups_group_magic_isset_with_empty_check() { 683 $this->old_current_user = get_current_user_id(); 684 685 $u = $this->factory->user->create(); 686 $g = $this->factory->group->create( array( 'creator_id' => $u ) ); 687 688 // Instantiate group object. 689 $this->set_current_user( $u ); 690 $group = new BP_Groups_Group( $g ); 691 692 // Assert ! empty() check is not false. 693 $this->assertNotFalse( ! empty( $group->is_member ) ); 694 695 $this->set_current_user( $this->old_current_user ); 696 } 697 679 698 /** convert_type_to_order_orderby() **********************************/ 680 699
Note: See TracChangeset
for help on using the changeset viewer.