[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @group members 5 */ 6 class BP_Tests_Members_Template_BpGetMemberClass extends BP_UnitTestCase { 7 /** 8 * @ticket BP6996 9 */ 10 public function test_should_contain_member_type_classes() { 11 buddypress()->members->types = array(); 12 bp_register_member_type( 'foo' ); 13 bp_register_member_type( 'bar' ); 14 15 $u = self::factory()->user->create(); 16 bp_set_member_type( $u, 'bar' ); 17 18 if ( bp_has_members( array( 'include' => array( $u ) ) ) ) { 19 while ( bp_members() ) { 20 bp_the_member(); 21 $found = bp_get_member_class(); 22 } 23 } 24 25 global $members_template; 26 unset( $members_template ); 27 buddypress()->members->types = array(); 28 29 $this->assertContains( 'member-type-bar', $found ); 30 $this->assertNotContains( 'member-type-foo', $found ); 31 } 32 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |