- 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-post.php
r44497 r44903 13 13 class WP_UnitTest_Factory_For_Post 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( … … 31 31 * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. 32 32 */ 33 function create_object( $args ) {33 public function create_object( $args ) { 34 34 return wp_insert_post( $args ); 35 35 } … … 43 43 * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success. 44 44 */ 45 function update_object( $post_id, $fields ) {45 public function update_object( $post_id, $fields ) { 46 46 $fields['ID'] = $post_id; 47 47 return wp_update_post( $fields ); … … 55 55 * @return null|WP_Post WP_Post on success or null on failure. 56 56 */ 57 function get_object_by_id( $post_id ) {57 public function get_object_by_id( $post_id ) { 58 58 return get_post( $post_id ); 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.