Changeset 14068 for trunk/tests/phpunit/testcases/xprofile/functions.php
- Timestamp:
- 11/01/2024 06:07:04 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/xprofile/functions.php
r13980 r14068 1421 1421 $this->assertEquals( '', $updated_u->last_name ); 1422 1422 } 1423 1424 /** 1425 * @ticket BP9207 1426 */ 1427 public function test_bp_xprofile_get_signup_field_ids() { 1428 add_filter( 'bp_get_signup_allowed', '__return_true' ); 1429 $signup_test_group = self::factory()->xprofile_group->create(); 1430 1431 $third = self::factory()->xprofile_field->create( 1432 array( 1433 'field_group_id' => $signup_test_group, 1434 'type' => 'textbox', 1435 'name' => 'thirdPosition' 1436 ) 1437 ); 1438 1439 $first = self::factory()->xprofile_field->create( 1440 array( 1441 'field_group_id' => $signup_test_group, 1442 'type' => 'textbox', 1443 'name' => 'firstPosition' 1444 ) 1445 ); 1446 1447 $tenth = self::factory()->xprofile_field->create( 1448 array( 1449 'field_group_id' => $signup_test_group, 1450 'type' => 'textbox', 1451 'name' => 'tenthPosition' 1452 ) 1453 ); 1454 1455 // Set order. 1456 bp_xprofile_update_field_meta( $first, 'signup_position', 1 ); 1457 bp_xprofile_update_field_meta( 1, 'signup_position', 2 ); 1458 bp_xprofile_update_field_meta( $third, 'signup_position', 3 ); 1459 bp_xprofile_update_field_meta( $tenth, 'signup_position', 10 ); 1460 1461 $this->assertSame( bp_xprofile_get_signup_field_ids(), array( $first, 1, $third, $tenth ) ); 1462 1463 xprofile_delete_field_group( $signup_test_group ); 1464 remove_filter( 'bp_get_signup_allowed', '__return_true' ); 1465 } 1423 1466 }
Note: See TracChangeset
for help on using the changeset viewer.