Make WordPress Core


Ignore:
Timestamp:
01/09/2019 05:43:14 AM (6 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-attachment.php

    r43571 r44497  
    1313     * }
    1414     * @param int   $legacy_parent Deprecated.
    15      * @param array $legacy_args   Deprecated
     15     * @param array $legacy_args   Deprecated.
     16     *
     17     * @return  int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
    1618     */
    1719    function create_object( $args, $legacy_parent = 0, $legacy_args = array() ) {
     
    3537    }
    3638
     39    /**
     40     * Saves an attachment.
     41     *
     42     * @param string $file   The file name to create attachment object for.
     43     * @param int    $parent The post id to attach the file to.
     44     *
     45     * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
     46     */
    3747    function create_upload_object( $file, $parent = 0 ) {
    3848        $contents = file_get_contents( $file );
Note: See TracChangeset for help on using the changeset viewer.