Changeset 39396 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 12/01/2016 12:01:38 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/media.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r39267 r39396 271 271 272 272 /** 273 * @ticket 38965 274 */ 275 function test_wp_prepare_attachment_for_js_without_image_sizes() { 276 // Create the attachement post. 277 $id = wp_insert_attachment( array( 278 'post_title' => 'Attachment Title', 279 'post_type' => 'attachment', 280 'post_parent' => 0, 281 'post_mime_type' => 'image/jpeg', 282 'guid' => 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/test-image.jpg', 283 ) ); 284 285 // Add attachment metadata without sizes. 286 wp_update_attachment_metadata( $id, array( 287 'width' => 50, 288 'height' => 50, 289 'file' => 'test-image.jpg', 290 ) ); 291 292 $prepped = wp_prepare_attachment_for_js( get_post( $id ) ); 293 294 $this->assertTrue( isset( $prepped['sizes'] ) ); 295 } 296 297 /** 273 298 * @ticket 19067 274 299 * @expectedDeprecated wp_convert_bytes_to_hr
Note: See TracChangeset
for help on using the changeset viewer.