Make WordPress Core


Ignore:
Timestamp:
01/09/2019 05:43:14 AM (8 years ago)
Author:
pento
Message:

Docs: Add docblocks for the PHPUnit factory objects.

Props andizer.
Fixes #44521.

File:
1 edited

Legend:

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

    r42343 r44497  
    2424        }
    2525
     26        /**
     27         * Creates a blog object.
     28         *
     29         * @param array $args Arguments for the site object.
     30         *
     31         * @return int|WP_Error Returns WP_Error object on failure, the site ID on success.
     32         */
    2633        function create_object( $args ) {
    2734                global $wpdb;
    … …  
    3946        }
    4047
     48        /**
     49         * Updates a blog object. Not implemented.
     50         *
     51         * @param int   $blog_id The blog id to update.
     52         * @param array $fields  The fields to update.
     53         *
     54         * @return void
     55         */
    4156        function update_object( $blog_id, $fields ) {}
    4257
     58        /**
     59         * Retrieves a site by given blog id.
     60         *
     61         * @param int $blog_id The blog id to retrieve.
     62         *
     63         * @return null|WP_Site The site object or null if not found.
     64         */
    4365        function get_object_by_id( $blog_id ) {
    4466                return get_site( $blog_id );
Note: See TracChangeset for help on using the changeset viewer.