Make WordPress Core


Ignore:
Timestamp:
03/15/2019 12:15:08 PM (8 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-comment.php

    r44497 r44903  
    1313class WP_UnitTest_Factory_For_Comment 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(
     
    3030         * @return false|int The comment's ID on success, false on failure.
    3131         */
    32         function create_object( $args ) {
     32        public function create_object( $args ) {
    3333                return wp_insert_comment( $this->addslashes_deep( $args ) );
    3434        }
     
    4242         * @return int When updated 1, not update 0.
    4343         */
    44         function update_object( $comment_id, $fields ) {
     44        public function update_object( $comment_id, $fields ) {
    4545                $fields['comment_ID'] = $comment_id;
    4646                return wp_update_comment( $this->addslashes_deep( $fields ) );
     
    5757         * @return int[] Array with the comment ids.
    5858         */
    59         function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) {
     59        public function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) {
    6060                $args['comment_post_ID'] = $post_id;
    6161                return $this->create_many( $count, $args, $generation_definitions );
     
    6969         * @return null|WP_Comment WP_Comment when found, null when not found.
    7070         */
    71         function get_object_by_id( $comment_id ) {
     71        public function get_object_by_id( $comment_id ) {
    7272                return get_comment( $comment_id );
    7373        }
Note: See TracChangeset for help on using the changeset viewer.