Make WordPress Core


Ignore:
Timestamp:
03/15/2019 12:15:08 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Add missing access modifiers to factory classes in phpunit/includes/factory.

Props andizer.
Fixes #46504.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-user.php

    r44497 r44903  
    1313class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing {
    1414
    15     function __construct( $factory = null ) {
     15    public function __construct( $factory = null ) {
    1616        parent::__construct( $factory );
    1717        $this->default_generation_definitions = array(
     
    2929     * @return int|WP_Error
    3030     */
    31     function create_object( $args ) {
     31    public function create_object( $args ) {
    3232        return wp_insert_user( $args );
    3333    }
     
    4141     * @return int|WP_Error User id on success. WP_Error on failure.
    4242     */
    43     function update_object( $user_id, $fields ) {
     43    public function update_object( $user_id, $fields ) {
    4444        $fields['ID'] = $user_id;
    4545        return wp_update_user( $fields );
     
    5353     * @return WP_User The user.
    5454     */
    55     function get_object_by_id( $user_id ) {
     55    public function get_object_by_id( $user_id ) {
    5656        return new WP_User( $user_id );
    5757    }
Note: See TracChangeset for help on using the changeset viewer.