Index: wp-testcase/test-xmlrpc-api/test_wp_deleteUser.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_deleteUser.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_deleteUser.php	(working copy)
@@ -0,0 +1,86 @@
+<?php
+
+class TestXMLRPCServer_wp_deleteUser extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'username', 'password', 1 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+	}
+
+	function test_incapable_user() {
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'author', 'author', 1 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 401, $result->code );
+	}
+
+	function test_invalid_user() {
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', 3492083940823 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 404, $result->code );
+	}
+
+	function test_delete_self() {
+		$administrator_id = get_user_by( 'login', 'administrator' )->ID;
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', $administrator_id ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 401, $result->code );
+	}
+
+	function test_invalid_reassign_user() {
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', $author_id, 3908423098423 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 404, $result->code );
+	}
+
+	function test_reassign_same() {
+		$author_id = get_user_by( 'login', 'author' )->ID;
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', $author_id, $author_id ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 401, $result->code );
+	}
+
+	function test_valid_delete() {
+		$user_id = $this->_make_user( 'author' );
+
+		// make some posts for the user
+		$this->_insert_quick_posts( rand( 3, 10 ), 'post', array( 'post_author' => $user_id ) );
+
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', $user_id ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+
+		// verify user was deleted
+		$this->assertFalse( get_user_by( 'id', $user_id ) );
+
+		// since reassign wasn't used, the user's posts should have been trashed
+		foreach ( $this->post_ids as $post_id ) {
+			$post = get_post( $post_id );
+			$this->assertEquals( 'trash', $post->post_status );
+		}
+
+		// cleanup
+		$this->post_ids = array();
+	}
+
+	function test_valid_delete_reassign() {
+		$user_id = $this->_make_user( 'author' );
+		$reassign_id = $this->_make_user( 'author' );
+
+		// make some posts for the user
+		$this->_insert_quick_posts( rand( 3, 10 ), 'post', array( 'post_author' => $user_id ) );
+
+		$result = $this->myxmlrpcserver->wp_deleteUser( array( 1, 'administrator', 'administrator', $user_id, $reassign_id ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+
+		// verify user was deleted
+		$this->assertFalse( get_user_by( 'id', $user_id ) );
+
+		// verify posts were reassigned to other author
+		foreach ( $this->post_ids as $post_id ) {
+			$post = get_post( $post_id );
+			$this->assertEquals( $reassign_id, $post->post_author );
+			$this->assertEquals( 'publish', $post->post_status );
+		}
+	}
+}
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_editUser.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_editUser.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_editUser.php	(working copy)
@@ -0,0 +1,10 @@
+<?php
+
+class TestXMLRPCServer_wp_editUser extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$result = $this->myxmlrpcserver->wp_editUser( array( 1, 'username', 'password', 1, array() ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+	}
+}
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_getUser.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_getUser.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_getUser.php	(working copy)
@@ -0,0 +1,123 @@
+<?php
+
+class TestXMLRPCServer_wp_getUser extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'username', 'password', 1 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+	}
+
+	function test_invalid_user() {
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', 34902348908234 ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 404, $result->code );
+	}
+
+	function test_incapable_user() {
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'subscriber', 'subscriber', $editor_id ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 401, $result->code );
+	}
+
+	function test_subscriber_self() {
+		$subscriber_id = get_user_by( 'login', 'subscriber' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'subscriber', 'subscriber', $subscriber_id ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $subscriber_id, $result['user_id'] );
+	}
+
+	function test_valid_user() {
+		$registered_date = strtotime( '-1 day' );
+		$user_data = array(
+			'user_login'      => 'getUserTestUser',
+			'user_pass'       => rand_str(),
+			'first_name'      => rand_str(),
+			'last_name'       => rand_str(),
+			'description'     => rand_str(100),
+			'user_email'      => 'getUserTestUser@example.com',
+			'nickname'        => rand_str(),
+			'user_nicename'   => rand_str(),
+			'display_name'    => rand_str(),
+			'user_url'        => 'http://www.example.com/testuser',
+			'role'            => 'author',
+			'aim'             => rand_str(),
+			'user_registered' => strftime( "%Y-%m-%d %H:%M:%S", $registered_date )
+		);
+		$user_id = wp_insert_user( $user_data );
+
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $user_id ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+
+		// check data types
+		$this->assertInternalType( 'string', $result['user_id'] );
+		$this->assertStringMatchesFormat( '%d', $result['user_id'] );
+		$this->assertInternalType( 'string', $result['username'] );
+		$this->assertInternalType( 'string', $result['first_name'] );
+		$this->assertInternalType( 'string', $result['last_name'] );
+		$this->assertInstanceOf( 'IXR_Date', $result['registered'] );
+		$this->assertInternalType( 'string', $result['bio'] );
+		$this->assertInternalType( 'string', $result['email'] );
+		$this->assertInternalType( 'string', $result['nickname'] );
+		$this->assertInternalType( 'string', $result['nicename'] );
+		$this->assertInternalType( 'string', $result['url'] );
+		$this->assertInternalType( 'string', $result['display_name'] );
+		$this->assertInternalType( 'array', $result['capabilities'] );
+		$this->assertInternalType( 'array', $result['roles'] );
+		$this->assertInternalType( 'array', $result['user_contacts'] );
+
+		// check expected values
+		$this->assertEquals( $user_id, $result['user_id'] );
+		$this->assertEquals( $user_data['user_login'], $result['username'] );
+		$this->assertEquals( $user_data['first_name'], $result['first_name'] );
+		$this->assertEquals( $user_data['last_name'], $result['last_name'] );
+		$this->assertEquals( $registered_date, $result['registered']->getTimestamp() );
+		$this->assertEquals( $user_data['description'], $result['bio'] );
+		$this->assertEquals( $user_data['user_email'], $result['email'] );
+		$this->assertEquals( $user_data['nickname'], $result['nickname'] );
+		$this->assertEquals( $user_data['user_nicename'], $result['nicename'] );
+		$this->assertEquals( $user_data['user_url'], $result['url'] );
+		$this->assertEquals( $user_data['display_name'], $result['display_name'] );
+		$this->assertArrayHasKey( $user_data['role'], $result['capabilities'] );
+		$this->assertEquals( 1, $result['capabilities'][$user_data['role']] );
+		$this->assertEquals( $user_data['user_login'], $result['username'] );
+		$this->assertContains( $user_data['role'], $result['roles'] );
+		$this->assertArrayHasKey( 'aim', $result['user_contacts'] );
+		$this->assertEquals( $user_data['aim'], $result['user_contacts']['aim'] );
+
+		wp_delete_user( $user_id );
+	}
+
+	function test_no_fields() {
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array() ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $editor_id, $result['user_id'] );
+
+		$expected_fields = array( 'user_id' );
+		$this->assertEquals( $expected_fields, array_keys( $result ) );
+	}
+
+	function test_basic_fields() {
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array( 'basic' ) ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $editor_id, $result['user_id'] );
+
+		$expected_fields = array( 'user_id', 'username', 'email', 'registered', 'display_name', 'nicename' );
+		$this->assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+	}
+
+	function test_arbitrary_fields() {
+		$fields = array( 'email', 'bio', 'user_contacts' );
+
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, $fields ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $editor_id, $result['user_id'] );
+
+		$expected_fields = array_merge( array( 'user_id' ), $fields );
+		$this->assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+	}
+}
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_getUserInfo.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_getUserInfo.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_getUserInfo.php	(working copy)
@@ -0,0 +1,38 @@
+<?php
+
+class TestXMLRPCServer_wp_getUserInfo extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$result = $this->myxmlrpcserver->wp_getUserInfo( array( 1, 'username', 'password' ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+	}
+
+	function test_subscriber() {
+		$subscriber_id = get_user_by( 'login', 'subscriber' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUserInfo( array( 1, 'subscriber', 'subscriber' ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $subscriber_id, $result['user_id'] );
+		$this->assertContains( 'subscriber', $result['roles'] );
+	}
+
+	function test_administrator() {
+		$administrator_id = get_user_by( 'login', 'administrator' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUserInfo( array( 1, 'administrator', 'administrator' ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $administrator_id, $result['user_id'] );
+		$this->assertContains( 'administrator', $result['roles'] );
+	}
+
+	function test_arbitrary_fields() {
+		$fields = array( 'email', 'bio', 'user_contacts' );
+
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+		$result = $this->myxmlrpcserver->wp_getUserInfo( array( 1, 'editor', 'editor', $fields ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( $editor_id, $result['user_id'] );
+
+		$expected_fields = array_merge( array( 'user_id' ), $fields );
+		$this->assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+	}
+}
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_getUsers.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_getUsers.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_getUsers.php	(working copy)
@@ -0,0 +1,69 @@
+<?php
+
+class TestXMLRPCServer_wp_getUsers extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'username', 'password' ) );
+		$this->assertInstanceOf( 'IXR_Error', $results );
+		$this->assertEquals( 403, $results->code );
+	}
+
+	function test_incapable_user() {
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'subscriber', 'subscriber' ) );
+		$this->assertInstanceOf( 'IXR_Error', $results );
+		$this->assertEquals( 401, $results->code );
+	}
+
+	function test_capable_user() {
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator' ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $results );
+	}
+
+	function test_invalid_role() {
+		$filter = array( 'role' => rand_str() );
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+		$this->assertInstanceOf( 'IXR_Error', $results );
+		$this->assertEquals( 403, $results->code );
+	}
+
+	function test_role_filter() {
+		$editor_id = get_user_by( 'login', 'editor' )->ID;
+
+		$filter = array( 'role' => 'editor' );
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $results );
+
+		$this->assertCount( 1, $results );
+		$this->assertEquals( $editor_id, $results[0]['user_id'] );
+	}
+
+	function test_paging_filters() {
+		$user_ids = get_users( array( 'fields' => 'ID' ) );
+
+		$users_found = array();
+		$page_size = count( $user_ids ) / 3;
+		$filter = array( 'number' => $page_size, $offset = 0 );
+		do {
+			$presults = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+			foreach( $presults as $user ) {
+				$users_found[] = $user['user_id'];
+			}
+			$filter['offset'] += $page_size;
+		} while ( count( $presults ) > 0 );
+
+		// verify that $user_ids matches $users_found
+		$this->assertEquals( 0, count( array_diff( $user_ids, $users_found ) ) );
+	}
+
+	function test_order_filters() {
+		$filter = array( 'orderby' => 'email', 'order' => 'ASC' );
+		$results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+		$this->assertNotInstanceOf( 'IXR_Error', $results );
+
+		$last_email = '';
+		foreach ( $results as $user ) {
+			$this->assertLessThanOrEqual( 0, strcmp( $last_email, $user['email'] ) );
+			$last_email = $user['email'];
+		}
+	}
+}
\ No newline at end of file
Index: wp-testcase/test-xmlrpc-api/test_wp_newUser.php
===================================================================
--- wp-testcase/test-xmlrpc-api/test_wp_newUser.php	(revision 0)
+++ wp-testcase/test-xmlrpc-api/test_wp_newUser.php	(working copy)
@@ -0,0 +1,10 @@
+<?php
+
+class TestXMLRPCServer_wp_newUser extends WPXMLRPCServerTestCase {
+
+	function test_invalid_username_password() {
+		$result = $this->myxmlrpcserver->wp_newUser( array( 1, 'username', 'password', array() ) );
+		$this->assertInstanceOf( 'IXR_Error', $result );
+		$this->assertEquals( 403, $result->code );
+	}
+}
\ No newline at end of file
