- Timestamp:
- 11/08/2016 11:00:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r39126 r39169 878 878 $user = get_userdata( $user_id ); 879 879 $this->assertEquals( 'en_US', $user->locale ); 880 } 881 882 /** 883 * @ticket 38632 884 */ 885 public function test_update_item_empty_locale() { 886 $user_id = $this->factory->user->create( array( 'user_login' => 'test_json_user', 'user_email' => 'testjson@example.com', 'locale' => 'de_DE' ) ); 887 $this->allow_user_to_manage_multisite(); 888 wp_set_current_user( self::$user ); 889 890 $request = new WP_REST_Request( 'PUT', '/wp/v2/users/' . $user_id ); 891 $request->set_param( 'locale', '' ); 892 $response = $this->server->dispatch( $request ); 893 $this->check_add_edit_user_response( $response, true ); 894 895 $data = $response->get_data(); 896 $this->assertEquals( get_locale(), $data['locale'] ); 897 $user = get_userdata( $user_id ); 898 $this->assertEquals( '', $user->locale ); 880 899 } 881 900
Note: See TracChangeset
for help on using the changeset viewer.