Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/14/2016 10:20:39 PM (8 years ago)
Author:
boonebgorges
Message:

Groups: Ensure that isset() returns true for newly-protected properties in BP_Groups_Group.

Props r-a-y.
Fixes #5451.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php

    r11095 r11103  
    677677    }
    678678
     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
    679698    /** convert_type_to_order_orderby() **********************************/
    680699
Note: See TracChangeset for help on using the changeset viewer.