diff --git tests/phpunit/testcases/xprofile/functions.php tests/phpunit/testcases/xprofile/functions.php
index 316556b..bd095cc 100644
|
|
|
Bar!';
|
| 580 | 580 | } |
| 581 | 581 | |
| 582 | 582 | /** |
| | 583 | * @group bp_get_member_profile_data |
| | 584 | */ |
| | 585 | public function test_bp_get_member_profile_data_cache() { |
| | 586 | $u1 = $this->create_user(); |
| | 587 | $u2 = $this->create_user(); |
| | 588 | $u3 = $this->create_user(); |
| | 589 | |
| | 590 | $g = $this->factory->xprofile_group->create(); |
| | 591 | $f = $this->factory->xprofile_field->create( array( |
| | 592 | 'field_group_id' => $g, |
| | 593 | 'type' => 'textbox', |
| | 594 | 'name' => 'Kewl', |
| | 595 | ) ); |
| | 596 | xprofile_set_field_data( $f, $u2, 'foo' ); |
| | 597 | |
| | 598 | $found = array(); |
| | 599 | if ( bp_has_members() ) { |
| | 600 | while ( bp_members() ) { |
| | 601 | bp_the_member(); |
| | 602 | |
| | 603 | $user_id = bp_get_member_user_id(); |
| | 604 | |
| | 605 | $found[ $user_id ] = bp_get_member_profile_data( array( |
| | 606 | 'field' => 'Kewl', |
| | 607 | ) ); |
| | 608 | } |
| | 609 | } |
| | 610 | print_r( $found ); |
| | 611 | |
| | 612 | // Cleanup |
| | 613 | unset( $GLOBALS['members_template'] ); |
| | 614 | |
| | 615 | $found = array(); |
| | 616 | if ( bp_has_members() ) { |
| | 617 | while ( bp_members() ) { |
| | 618 | bp_the_member(); |
| | 619 | |
| | 620 | $user_id = bp_get_member_user_id(); |
| | 621 | |
| | 622 | $found[ $user_id ] = bp_get_member_profile_data( array( |
| | 623 | 'field' => 'Kewl', |
| | 624 | ) ); |
| | 625 | } |
| | 626 | } |
| | 627 | print_r( $found ); |
| | 628 | |
| | 629 | // Cleanup |
| | 630 | unset( $GLOBALS['members_template'] ); |
| | 631 | } |
| | 632 | |
| | 633 | /** |
| 583 | 634 | * @group xprofile_set_field_data |
| 584 | 635 | */ |
| 585 | 636 | public function test_get_field_data_integer_zero() { |