Changeset 1241 in tests
- Timestamp:
- 03/08/2013 08:31:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/factory.php
r1230 r1241 4 4 function __construct() { 5 5 $this->post = new WP_UnitTest_Factory_For_Post( $this ); 6 $this->attachment = new WP_UnitTest_Factory_For_Attachment( $this ); 6 7 $this->comment = new WP_UnitTest_Factory_For_Comment( $this ); 7 8 $this->user = new WP_UnitTest_Factory_For_User( $this ); … … 39 40 return get_post( $post_id ); 40 41 } 42 } 43 44 class WP_UnitTest_Factory_For_Attachment extends WP_UnitTest_Factory_For_Post { 45 46 function create_object( $file, $parent = 0, $args = array() ) { 47 return wp_insert_attachment( $args, $file, $parent ); 48 } 41 49 } 42 50
Note: See TracChangeset
for help on using the changeset viewer.