| 1834 | |
| 1835 | /** |
| 1836 | * @group magic |
| 1837 | */ |
| 1838 | public function test_bp_groups_group_magic_isset_with_empty_check() { |
| 1839 | $this->old_current_user = get_current_user_id(); |
| 1840 | |
| 1841 | $u = $this->factory->user->create(); |
| 1842 | $g = $this->factory->group->create( array( 'creator_id' => $u ) ); |
| 1843 | |
| 1844 | // Instantiate group object. |
| 1845 | $this->set_current_user( $u ); |
| 1846 | $group = new BP_Groups_Group( $g ); |
| 1847 | |
| 1848 | // Assert ! empty() check is not false. |
| 1849 | $this->assertNotFalse( ! empty( $group->is_member ) ); |
| 1850 | |
| 1851 | $this->set_current_user( $this->old_current_user ); |
| 1852 | } |