- Timestamp:
- 03/15/2019 12:15:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-user.php
r44497 r44903 13 13 class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing { 14 14 15 function __construct( $factory = null ) {15 public function __construct( $factory = null ) { 16 16 parent::__construct( $factory ); 17 17 $this->default_generation_definitions = array( … … 29 29 * @return int|WP_Error 30 30 */ 31 function create_object( $args ) {31 public function create_object( $args ) { 32 32 return wp_insert_user( $args ); 33 33 } … … 41 41 * @return int|WP_Error User id on success. WP_Error on failure. 42 42 */ 43 function update_object( $user_id, $fields ) {43 public function update_object( $user_id, $fields ) { 44 44 $fields['ID'] = $user_id; 45 45 return wp_update_user( $fields ); … … 53 53 * @return WP_User The user. 54 54 */ 55 function get_object_by_id( $user_id ) {55 public function get_object_by_id( $user_id ) { 56 56 return new WP_User( $user_id ); 57 57 }
Note: See TracChangeset
for help on using the changeset viewer.