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-post.php

    r44497 r44903  
    1313class WP_UnitTest_Factory_For_Post 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(
     
    3131     * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
    3232     */
    33     function create_object( $args ) {
     33    public function create_object( $args ) {
    3434        return wp_insert_post( $args );
    3535    }
     
    4343     * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success.
    4444     */
    45     function update_object( $post_id, $fields ) {
     45    public function update_object( $post_id, $fields ) {
    4646        $fields['ID'] = $post_id;
    4747        return wp_update_post( $fields );
     
    5555     * @return null|WP_Post WP_Post on success or null on failure.
    5656     */
    57     function get_object_by_id( $post_id ) {
     57    public function get_object_by_id( $post_id ) {
    5858        return get_post( $post_id );
    5959    }
Note: See TracChangeset for help on using the changeset viewer.