WordPress.org

Make WordPress Core

Changeset 449 in tests


Ignore:
Timestamp:
10/06/2011 09:36:31 PM (7 years ago)
Author:
ryan
Message:

Test update of additional user keys in wp_update_user()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_user.php

    r448 r449  
    282282        // Make sure there is no collateral damage to fields not in $user_data
    283283        $this->assertEquals( 'about me', $user->get( 'description' ) );
     284
     285        // Test update of fields in _get_additional_user_keys()
     286        $user_data = array( 'ID' => $user_id, 'use_ssl' => 1, 'show_admin_bar_front' => 1,
     287                           'rich_editing' => 1, 'first_name' => 'first', 'last_name' => 'last',
     288                           'nickname' => 'nick', 'comment_shortcuts' => 1, 'admin_color' => 'classic',
     289                           'description' => 'describe', 'aim' => 'aim', 'yim' => 'yim', 'jabber' => 'jabber' );
     290        wp_update_user( $user_data );
     291
     292        $user = new WP_User( $user_id );
     293        foreach ( $user_data as $key => $value )
     294            $this->assertEquals( $value, $user->get( $key ), $key );
    284295    }
    285296}
Note: See TracChangeset for help on using the changeset viewer.