Changeset 58849 for trunk/tests/phpunit/tests/image/resize.php
- Timestamp:
- 08/05/2024 04:11:40 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/image/resize.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/resize.php
r57524 r58849 115 115 } 116 116 117 /** 118 * Test resizing HEIC image. 119 * 120 * @ticket 53645 121 */ 122 public function test_resize_heic() { 123 $file = DIR_TESTDATA . '/images/test-image.heic'; 124 $editor = wp_get_image_editor( $file ); 125 126 // Check if the editor supports the HEIC mime type. 127 if ( is_wp_error( $editor ) || ! $editor->supports_mime_type( 'image/heic' ) ) { 128 $this->markTestSkipped( 'No HEIC support in the editor engine on this system.' ); 129 } 130 131 $image = $this->resize_helper( $file, 25, 25 ); 132 133 list( $w, $h, $type ) = wp_getimagesize( $image ); 134 135 unlink( $image ); 136 137 $this->assertSame( 'test-image-25x25.jpg', wp_basename( $image ) ); 138 $this->assertSame( 25, $w ); 139 $this->assertSame( 25, $h ); 140 $this->assertSame( IMAGETYPE_JPEG, $type ); 141 } 142 117 143 public function test_resize_larger() { 118 144 // image_resize() should refuse to make an image larger. … … 236 262 } 237 263 238 return $ dest_file;264 return $saved['path']; 239 265 } 240 266 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)