diff --git tests/phpunit/testcases/members/types.php tests/phpunit/testcases/members/types.php
index de047a0..ed276a8 100644
|
|
|
class BP_Tests_Members_Types extends BP_UnitTestCase { |
| 205 | 205 | $this->assertFalse( wp_cache_get( $u, 'bp_member_type' ) ); |
| 206 | 206 | $this->assertFalse( bp_get_member_type( $u ) ); |
| 207 | 207 | } |
| | 208 | |
| | 209 | /** |
| | 210 | * @group BP6242 |
| | 211 | * @group cache |
| | 212 | */ |
| | 213 | public function test_bp_get_member_type_should_not_conflict_with_term_cache() { |
| | 214 | $u1 = $this->factory->user->create(); |
| | 215 | $u2 = $this->factory->user->create(); |
| | 216 | bp_register_member_type( 'foo' ); |
| | 217 | bp_set_member_type( $u2, 'foo' ); |
| | 218 | |
| | 219 | // Make sure WordPress is using update_term_cache() |
| | 220 | $terms = get_terms( 'bp_member_type', array( 'hide_empty' => false, 'fields' => 'all' ) ); |
| | 221 | |
| | 222 | $this->assertFalse( wp_cache_get( $u1, 'bp_member_type' ), 'The BuddyPress member type cache should not conflict with the WordPress term cache' ); |
| | 223 | } |
| 208 | 224 | } |