Changeset 948 in tests
- Timestamp:
- 08/05/2012 10:11:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/factory.php
r922 r948 33 33 return wp_update_post( $fields ); 34 34 } 35 36 function get( $post_id ) { 37 return get_post( $post_id ); 38 } 35 39 } 36 40 … … 54 58 return wp_update_user( $fields ); 55 59 } 60 61 function get( $user_id ) { 62 return get_user( $user_id ); 63 } 56 64 } 57 65 … … 79 87 $args['comment_post_ID'] = $post_id; 80 88 return $this->create_many( $count, $args, $generation_definitions ); 89 } 90 91 function get( $comment_id ) { 92 return get_comment( $comment_id ); 81 93 } 82 94 } … … 102 114 103 115 function update_object( $blog_id, $fields ) {} 116 117 function get( $blog_id ) { 118 return get_blog_details( $blog_id, false ); 119 } 104 120 } 105 121 … … 136 152 function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) { 137 153 return wp_set_post_terms( $post_id, $terms, $taxonomy, $append ); 154 } 155 156 function get( $term_id ) { 157 return get_term( $term_id ); 138 158 } 139 159 } … … 177 197 return $created; 178 198 } 199 200 function create_and_get( $args = array(), $generation_definitions = null ) { 201 $object_id = $this->create( $args, $generation_definitions ); 202 return $this->get( $object_id ); 203 } 204 205 abstract function get( $object_id ); 179 206 180 207 function create_many( $count, $args = array(), $generation_definitions = null ) {
Note: See TracChangeset
for help on using the changeset viewer.