WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/09/2019 05:43:14 AM (4 months 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-callback-after-create.php

    r36347 r44497  
    22
    33class WP_UnitTest_Factory_Callback_After_Create {
     4
     5    /**
     6     * @var callable
     7     */
    48    var $callback;
    59
     10    /**
     11     * WP_UnitTest_Factory_Callback_After_Create constructor.
     12     *
     13     * @param callable $callback A callback function.
     14     */
    615    function __construct( $callback ) {
    716        $this->callback = $callback;
    817    }
    918
     19    /**
     20     * Calls the set callback on given object.
     21     *
     22     * @param mixed $object The object to apply the callback on.
     23     *
     24     * @return mixed The possibly altered object.
     25     */
    1026    function call( $object ) {
    1127        return call_user_func( $this->callback, $object );
Note: See TracChangeset for help on using the changeset viewer.