- Timestamp:
- 07/07/2017 06:38:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/members/class-bp-signup.php
r9819 r11630 63 63 64 64 /** 65 * @group add 66 */ 67 public function test_add_no_visibility_level_set_should_use_default_visiblity_level() { 68 // Update field_1's default visiblity to 'adminsonly' 69 bp_xprofile_update_field_meta( 1, 'default_visibility', 'adminsonly' ); 70 71 // Add new signup without a custom field visibility set for field_1. 72 $signup = BP_Signup::add( array( 73 'domain' => 'foo', 74 'path' => 'bar', 75 'title' => 'Foo bar', 76 'user_login' => 'user1', 77 'user_email' => 'user1@example.com', 78 'registered' => bp_core_current_time(), 79 'activation_key' => '12345', 80 'meta' => array( 81 'field_1' => 'Foo Bar', 82 'meta1' => 'meta2', 83 'password' => 'password', 84 85 /* 86 * Ensure we pass the field ID. 87 * 88 * See bp_core_activate_signup() and BP_Signup::add_backcompat(). 89 */ 90 'profile_field_ids' => '1' 91 ), 92 ) ); 93 94 // Activate the signup. 95 $activate = BP_Signup::activate( (array) $signup ); 96 97 // Assert that field 1's visibility for the signup is still 'adminsonly' 98 $vis = xprofile_get_field_visibility_level( 1, $activate['activated'][0] ); 99 $this->assertSame( 'adminsonly', $vis ); 100 } 101 102 /** 65 103 * @group get 66 104 */
Note: See TracChangeset
for help on using the changeset viewer.