- Timestamp:
- 03/15/2019 12:15:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-comment.php
r44497 r44903 13 13 class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing { 14 14 15 function __construct( $factory = null ) {15 public function __construct( $factory = null ) { 16 16 parent::__construct( $factory ); 17 17 $this->default_generation_definitions = array( … … 30 30 * @return false|int The comment's ID on success, false on failure. 31 31 */ 32 function create_object( $args ) {32 public function create_object( $args ) { 33 33 return wp_insert_comment( $this->addslashes_deep( $args ) ); 34 34 } … … 42 42 * @return int When updated 1, not update 0. 43 43 */ 44 function update_object( $comment_id, $fields ) {44 public function update_object( $comment_id, $fields ) { 45 45 $fields['comment_ID'] = $comment_id; 46 46 return wp_update_comment( $this->addslashes_deep( $fields ) ); … … 57 57 * @return int[] Array with the comment ids. 58 58 */ 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 ) { 60 60 $args['comment_post_ID'] = $post_id; 61 61 return $this->create_many( $count, $args, $generation_definitions ); … … 69 69 * @return null|WP_Comment WP_Comment when found, null when not found. 70 70 */ 71 function get_object_by_id( $comment_id ) {71 public function get_object_by_id( $comment_id ) { 72 72 return get_comment( $comment_id ); 73 73 }
Note: See TracChangeset
for help on using the changeset viewer.