Changeset 44785 for trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php
- Timestamp:
- 03/01/2019 08:57:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php
r44497 r44785 47 47 function create_upload_object( $file, $parent = 0 ) { 48 48 $contents = file_get_contents( $file ); 49 $upload = wp_upload_bits( basename( $file ), null, $contents );49 $upload = wp_upload_bits( wp_basename( $file ), null, $contents ); 50 50 51 51 $type = ''; … … 60 60 61 61 $attachment = array( 62 'post_title' => basename( $upload['file'] ),62 'post_title' => wp_basename( $upload['file'] ), 63 63 'post_content' => '', 64 64 'post_type' => 'attachment',
Note: See TracChangeset
for help on using the changeset viewer.